Bug 1447052 - Set up LightweightThemeConsumer in onBeforeInitialXULLayout instead of onLoad draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 20 Mar 2018 12:19:39 -0700
changeset 770110 839f21b3b846a201c2819e401f68a5b6d7f86e58
parent 769595 c8dbb4ed05f38f40ef3607a6e36545bd95b8a287
push id103326
push userbgrinstead@mozilla.com
push dateTue, 20 Mar 2018 19:20:37 +0000
bugs1447052
milestone61.0a1
Bug 1447052 - Set up LightweightThemeConsumer in onBeforeInitialXULLayout instead of onLoad MozReview-Commit-ID: GjuSvpkywlR
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1225,16 +1225,17 @@ var gBrowserInit = {
       document.documentElement.setAttribute("width", width);
       document.documentElement.setAttribute("height", height);
 
       if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
         document.documentElement.setAttribute("sizemode", "maximized");
       }
     }
 
+    new LightweightThemeConsumer(document);
     TabsInTitlebar.init();
   },
 
   onDOMContentLoaded() {
     gBrowser = window._gBrowser;
     delete window._gBrowser;
     gBrowser.init();
 
@@ -1356,17 +1357,16 @@ var gBrowserInit = {
     Services.obs.notifyObservers(window, "browser-window-before-show");
 
     if (!window.toolbar.visible) {
       // adjust browser UI for popups
       gURLBar.setAttribute("readonly", "true");
     }
 
     // Misc. inits.
-    new LightweightThemeConsumer(document);
     TabletModeUpdater.init();
     CombinedStopReload.ensureInitialized();
     gPrivateBrowsingUI.init();
     BrowserPageActions.init();
     gAccessibilityServiceIndicator.init();
 
     if (window.matchMedia("(-moz-os-version: windows-win8)").matches &&
         window.matchMedia("(-moz-windows-default-theme)").matches) {