Bug 1447052 - Set up LightweightThemeConsumer in onDOMContentLoaded instead of onLoad. r=dao, a=jcristau DEVEDITION_60_0b8_BUILD1 DEVEDITION_60_0b8_RELEASE FIREFOX_60_0b8_BUILD1 FIREFOX_60_0b8_RELEASE
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 28 Mar 2018 17:19:00 -0400
changeset 776118 106b1066bb3fb6a4821a8da52cc913846149928a
parent 776117 da6d3b5f248b266857f9a1a434b9ea35a4ecde50
child 776119 7ca00684f55b1ee76fe579c38ee81ac5361fe668
push id104821
push userbmo:rrosario@mozilla.com
push dateMon, 02 Apr 2018 18:45:53 +0000
reviewersdao, jcristau
bugs1447052
milestone60.0
Bug 1447052 - Set up LightweightThemeConsumer in onDOMContentLoaded instead of onLoad. r=dao, a=jcristau This is specifically for Fx60 uplift, since the patch landed for Fx61 used onBeforeInitialXULLayout which isn't available on earlier releases.
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1249,16 +1249,17 @@ var gBrowserInit = {
         document.documentElement.setAttribute("sizemode", "maximized");
       }
     }
 
     gBrowser.updateBrowserRemoteness(initBrowser, isRemote, {
       remoteType, sameProcessAsFrameLoader
     });
 
+    new LightweightThemeConsumer(document);
     gUIDensity.init();
 
     if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
       gDragSpaceObserver.init();
     }
 
     // Hack to ensure that the about:home favicon is loaded
     // instantaneously, to avoid flickering and improve perceived performance.
@@ -1327,17 +1328,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) {