Bug 1447052 - Set up LightweightThemeConsumer in onBeforeInitialXULLayout instead of onLoad
MozReview-Commit-ID: GjuSvpkywlR
--- 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) {