Bug 729011 - Make fullscr-toggler not affect viewport size.
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 09 Mar 2016 12:13:47 -0800
changeset 287827 b2b0a09c6e1af30437efc99c295d51598d86293d
parent 287826 a21e11fe422234f6e874ffdfdf29fab581ab16b9
child 287828 2c9d4c7e3d2d6c5e34ab466ee0edc02c0a4d2d1f
push id30070
push usercbook@mozilla.com
push dateThu, 10 Mar 2016 10:45:07 +0000
treeherdermozilla-central@aaacd6e2d9f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs729011
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 729011 - Make fullscr-toggler not affect viewport size. MozReview-Commit-ID: DRaMQIspykj
browser/base/content/browser-fullScreen.js
browser/base/content/browser.css
browser/base/content/browser.xul
--- a/browser/base/content/browser-fullScreen.js
+++ b/browser/base/content/browser-fullScreen.js
@@ -560,24 +560,16 @@ var FullScreen = {
   hideNavToolbox: function (aAnimate = false) {
     if (this._isChromeCollapsed || !this._safeToCollapse())
       return;
 
     this._fullScrToggler.hidden = false;
 
     if (aAnimate && gPrefService.getBoolPref("browser.fullscreen.animate")) {
       gNavToolbox.setAttribute("fullscreenShouldAnimate", true);
-      // Hide the fullscreen toggler until the transition ends.
-      let listener = () => {
-        gNavToolbox.removeEventListener("transitionend", listener, true);
-        if (this._isChromeCollapsed)
-          this._fullScrToggler.hidden = false;
-      };
-      gNavToolbox.addEventListener("transitionend", listener, true);
-      this._fullScrToggler.hidden = true;
     }
 
     gNavToolbox.style.marginTop =
       -gNavToolbox.getBoundingClientRect().height + "px";
     this._isChromeCollapsed = true;
     MousePosTracker.removeListener(this);
   },
 
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -658,18 +658,22 @@ window[chromehidden~="toolbar"] toolbar:
 
 #historySwipeAnimationNextPage {
   background-image: -moz-element(#historySwipeAnimationNextPageSnapshot);
 }
 
 /*  Full Screen UI */
 
 #fullscr-toggler {
+  top: 0;
+  left: 0;
+  width: 100%;
   height: 1px;
-  background: black;
+  position: fixed;
+  z-index: 2147483647;
 }
 
 html|*#fullscreen-warning {
   position: fixed;
   z-index: 2147483647 !important;
   visibility: visible;
   transition: transform 300ms ease-in;
   /* To center the warning box horizontally,
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -1003,18 +1003,16 @@
       <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      observes="View:FullScreen"
                      type="checkbox"
                      label="&fullScreenCmd.label;"
                      tooltip="dynamic-shortcut-tooltip"/>
     </toolbarpalette>
   </toolbox>
 
-  <hbox id="fullscr-toggler" hidden="true"/>
-
   <deck id="content-deck" flex="1">
     <hbox flex="1" id="browser">
       <vbox id="browser-border-start" hidden="true" layer="true"/>
       <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
         <sidebarheader id="sidebar-header" align="center">
           <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
           <image id="sidebar-throbber"/>
           <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
@@ -1128,9 +1126,12 @@
   </svg:svg>
 
 </vbox>
 # <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
 #     Introducing the iframe dynamically, as needed, was found to be better than
 #     starting with an empty iframe here in browser.xul from a Ts standpoint.
 </deck>
 
+# Put it at the very end to make sure it is not covered by anything.
+<hbox id="fullscr-toggler" hidden="true"/>
+
 </window>