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 462920 106b1066bb3fb6a4821a8da52cc913846149928a
parent 462919 da6d3b5f248b266857f9a1a434b9ea35a4ecde50
child 462921 7ca00684f55b1ee76fe579c38ee81ac5361fe668
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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) {