diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index d1959af1..62edb74a 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -77,16 +77,25 @@ /* tab bar in the DOM-fullscreen mode */ -.tabbrowser-tabs[treestyletab-dom-fullscreen-activated="true"], -.tabbrowser-strip[treestyletab-dom-fullscreen-activated="true"], -.tabbrowser-strip[treestyletab-dom-fullscreen-activated="true"]+splitter, -.treestyletab-tabbar-toolbar[treestyletab-dom-fullscreen-activated="true"], -.treestyletab-tabbar-toolbar[treestyletab-dom-fullscreen-activated="true"] > *, -tabbrowser[treestyletab-dom-fullscreen-activated="true"][tabcontainer] +:root[inDOMFullscreen="true"] + .tabbrowser-tabs, +:root[inDOMFullscreen="true"] + .tabbrowser-strip, +:root[inDOMFullscreen="true"] + .tabbrowser-strip+splitter, +:root[inDOMFullscreen="true"] + .treestyletab-tabbar-toolbar, +:root[inDOMFullscreen="true"] + .treestyletab-tabbar-toolbar > *, +:root[inDOMFullscreen="true"] + tabbrowser[tabcontainer] .tabbrowser-strip.treestyletab-tabbar-placeholder, -tabbrowser[treestyletab-dom-fullscreen-activated="true"][tabcontainer] - .tabbrowser-strip.treestyletab-tabbar-placeholder+splitter { - visibility: collapse; +:root[inDOMFullscreen="true"] + tabbrowser[tabcontainer] + .tabbrowser-strip.treestyletab-tabbar-placeholder+splitter, +:root[inDOMFullscreen="true"] + .treestyletab-tabbar-toggler { + visibility: collapse !important; } diff --git a/modules/browser.js b/modules/browser.js index 8dd9d8dd..8efd51cc 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -5136,18 +5136,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { onBeforeFullScreenToggle : function TSTBrowser_onBeforeFullScreenToggle(aEnterFS) { if (this.position != 'top') { - // entering to the DOM-fullscreen (ex. YouTube Player) - if (this.document.mozFullScreen) { - this.setTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED, true); - } - else { - if (this.document.documentElement.getAttribute(this.kDOM_FULLSCREEN_ACTIVATED) != 'true') { - if (aEnterFS) - this.autoHide.startForFullScreen(); - else - this.autoHide.endForFullScreen(); - } - this.removeTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED); + // ignore entering to the DOM-fullscreen (ex. YouTube Player) + if (!this.document.mozFullScreen) { + if (aEnterFS) + this.autoHide.startForFullScreen(); + else + this.autoHide.endForFullScreen(); } } }, diff --git a/modules/constants.js b/modules/constants.js index 3f169b9c..84a042a7 100644 --- a/modules/constants.js +++ b/modules/constants.js @@ -82,7 +82,6 @@ var TreeStyleTabConstants = Object.freeze({ kFAVICONIZED : 'treestyletab-faviconized', kBG_NOTIFY_PHASE : 'treestyletab-notifybgtab-phase', kIGNORE_POPUP_STATE : 'treestyletab-ignore-state', - kDOM_FULLSCREEN_ACTIVATED : 'treestyletab-dom-fullscreen-activated', kTAB_INVERTED : 'treestyletab-tab-inverted', kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted',