Backed out changeset b2b0a09c6e1a (bug 729011) for bug 1257686
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 05 Apr 2016 17:59:08 +1000
changeset 347755 b3d95f2926e6ca7011ea1a32288f04e22337b0dd
parent 347754 de39f972fdbe2bf09305c1f3022a1d31a6c7a811
child 347756 b98bd60a5a876b55af6272c10fdd3b640a6dd9e8
push id14653
push userolivier@olivieryiptong.com
push dateTue, 05 Apr 2016 19:21:01 +0000
bugs729011, 1257686
milestone48.0a1
backs outb2b0a09c6e1af30437efc99c295d51598d86293d
Backed out changeset b2b0a09c6e1a (bug 729011) for bug 1257686
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,16 +560,24 @@ 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,22 +658,18 @@ window[chromehidden~="toolbar"] toolbar:
 
 #historySwipeAnimationNextPage {
   background-image: -moz-element(#historySwipeAnimationNextPageSnapshot);
 }
 
 /*  Full Screen UI */
 
 #fullscr-toggler {
-  top: 0;
-  left: 0;
-  width: 100%;
   height: 1px;
-  position: fixed;
-  z-index: 2147483647;
+  background: black;
 }
 
 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
@@ -1043,16 +1043,18 @@
       <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();"/>
@@ -1166,12 +1168,9 @@
   </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>