diff options
Diffstat (limited to 'toolkit/modules/LightweightThemeConsumer.jsm')
-rw-r--r-- | toolkit/modules/LightweightThemeConsumer.jsm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm index cd456eac2e..325f711b78 100644 --- a/toolkit/modules/LightweightThemeConsumer.jsm +++ b/toolkit/modules/LightweightThemeConsumer.jsm @@ -8,7 +8,6 @@ const {utils: Cu} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeImageOptimizer", "resource://gre/modules/addons/LightweightThemeImageOptimizer.jsm"); @@ -148,12 +147,13 @@ LightweightThemeConsumer.prototype = { footer.removeAttribute("lwthemefooter"); } +#ifdef XP_MACOSX // On OS X, we extend the lightweight theme into the titlebar, which means setting // the chromemargin attribute. Some XUL applications already draw in the titlebar, // so we need to save the chromemargin value before we overwrite it with the value // that lets us draw in the titlebar. We stash this value on the root attribute so // that XUL applications have the ability to invalidate the saved value. - if (AppConstants.platform == "macosx" && stateChanging) { + if (stateChanging) { if (!root.hasAttribute("chromemargin-nonlwtheme")) { root.setAttribute("chromemargin-nonlwtheme", root.getAttribute("chromemargin")); } @@ -169,6 +169,7 @@ LightweightThemeConsumer.prototype = { } } } +#endif Services.obs.notifyObservers(this._win, "lightweight-theme-window-updated", JSON.stringify(aData)); } |