Hide toolbar related elements completely in the DOM fullscreen mode.

The "inDOMFullscreen" attribute is introduced at Firefox 36 by http://hg.mozilla.org/mozilla-central/rev/3aef39ca3919 and now TST supports only Firefox 38 and newer. So we should use it instead of my custom attribute.
This commit is contained in:
Piro / YUKI Hiroshi 2015-10-27 00:42:52 +09:00
parent cfca590bc3
commit 036ca2a5d5
3 changed files with 24 additions and 22 deletions

View File

@ -77,16 +77,25 @@
/* tab bar in the DOM-fullscreen mode */ /* tab bar in the DOM-fullscreen mode */
.tabbrowser-tabs[treestyletab-dom-fullscreen-activated="true"], :root[inDOMFullscreen="true"]
.tabbrowser-strip[treestyletab-dom-fullscreen-activated="true"], .tabbrowser-tabs,
.tabbrowser-strip[treestyletab-dom-fullscreen-activated="true"]+splitter, :root[inDOMFullscreen="true"]
.treestyletab-tabbar-toolbar[treestyletab-dom-fullscreen-activated="true"], .tabbrowser-strip,
.treestyletab-tabbar-toolbar[treestyletab-dom-fullscreen-activated="true"] > *, :root[inDOMFullscreen="true"]
tabbrowser[treestyletab-dom-fullscreen-activated="true"][tabcontainer] .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-strip.treestyletab-tabbar-placeholder,
tabbrowser[treestyletab-dom-fullscreen-activated="true"][tabcontainer] :root[inDOMFullscreen="true"]
.tabbrowser-strip.treestyletab-tabbar-placeholder+splitter { tabbrowser[tabcontainer]
visibility: collapse; .tabbrowser-strip.treestyletab-tabbar-placeholder+splitter,
:root[inDOMFullscreen="true"]
.treestyletab-tabbar-toggler {
visibility: collapse !important;
} }

View File

@ -5136,19 +5136,13 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
onBeforeFullScreenToggle : function TSTBrowser_onBeforeFullScreenToggle(aEnterFS) onBeforeFullScreenToggle : function TSTBrowser_onBeforeFullScreenToggle(aEnterFS)
{ {
if (this.position != 'top') { if (this.position != 'top') {
// entering to the DOM-fullscreen (ex. YouTube Player) // ignore entering to the DOM-fullscreen (ex. YouTube Player)
if (this.document.mozFullScreen) { if (!this.document.mozFullScreen) {
this.setTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED, true);
}
else {
if (this.document.documentElement.getAttribute(this.kDOM_FULLSCREEN_ACTIVATED) != 'true') {
if (aEnterFS) if (aEnterFS)
this.autoHide.startForFullScreen(); this.autoHide.startForFullScreen();
else else
this.autoHide.endForFullScreen(); this.autoHide.endForFullScreen();
} }
this.removeTabbrowserAttribute(this.kDOM_FULLSCREEN_ACTIVATED);
}
} }
}, },

View File

@ -82,7 +82,6 @@ var TreeStyleTabConstants = Object.freeze({
kFAVICONIZED : 'treestyletab-faviconized', kFAVICONIZED : 'treestyletab-faviconized',
kBG_NOTIFY_PHASE : 'treestyletab-notifybgtab-phase', kBG_NOTIFY_PHASE : 'treestyletab-notifybgtab-phase',
kIGNORE_POPUP_STATE : 'treestyletab-ignore-state', kIGNORE_POPUP_STATE : 'treestyletab-ignore-state',
kDOM_FULLSCREEN_ACTIVATED : 'treestyletab-dom-fullscreen-activated',
kTAB_INVERTED : 'treestyletab-tab-inverted', kTAB_INVERTED : 'treestyletab-tab-inverted',
kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted', kTAB_CONTENTS_INVERTED : 'treestyletab-tab-contents-inverted',