Bug 1192683 - Retry hiding toolbox when some of safe-to-collapse conditions change. r=dao
authorXidorn Quan <quanxunzhen@gmail.com>
Fri, 23 Oct 2015 18:13:02 +1100
changeset 269455 f944a86418a951905bf17a94a7d2fc8abf18ad38
parent 269356 626ba108adf2612f7ba6e009602145db54199189
child 269456 60d33952d4cad718c786bea4d229cb137d5b2317
push id29582
push userkwierso@gmail.com
push dateMon, 26 Oct 2015 20:20:22 +0000
treeherdermozilla-central@07625f7a06d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1192683
milestone44.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 1192683 - Retry hiding toolbox when some of safe-to-collapse conditions change. r=dao
browser/base/content/browser-fullScreen.js
--- a/browser/base/content/browser-fullScreen.js
+++ b/browser/base/content/browser-fullScreen.js
@@ -302,28 +302,33 @@ var FullScreen = {
     // Popups should only veto chrome collapsing if they were opened when the chrome was not collapsed.
     // Otherwise, they would not affect chrome and the user would expect the chrome to go away.
     // e.g. we wouldn't want the autoscroll icon firing this event, so when the user
     // toggles chrome when moving mouse to the top, it doesn't go away again.
     if (aEvent.type == "popupshown" && !FullScreen._isChromeCollapsed &&
         aEvent.target.localName != "tooltip" && aEvent.target.localName != "window")
       FullScreen._isPopupOpen = true;
     else if (aEvent.type == "popuphidden" && aEvent.target.localName != "tooltip" &&
-             aEvent.target.localName != "window")
+             aEvent.target.localName != "window") {
       FullScreen._isPopupOpen = false;
+      // Try again to hide toolbar when we close the popup.
+      FullScreen.hideNavToolbox(true);
+    }
   },
 
   // Autohide helpers for the context menu item
   getAutohide: function(aItem)
   {
     aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide"));
   },
   setAutohide: function()
   {
     gPrefService.setBoolPref("browser.fullscreen.autohide", !gPrefService.getBoolPref("browser.fullscreen.autohide"));
+    // Try again to hide toolbar when we change the pref.
+    FullScreen.hideNavToolbox(true);
   },
 
   _WarningBox: {
     _element: null,
     _origin: null,
 
     /**
      * Timeout object for managing timeout request. If it is started when