diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-02 04:25:47 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-02 04:25:47 -0500 |
commit | 6a3907dae474c7e1f31df13a26605278d3500a0d (patch) | |
tree | ea2edc8f5df02710226259f57ea412789d979dac /toolkit/modules/LightweightThemeConsumer.jsm | |
parent | 7d21d02d532fed5613501de63f8b3d50144a751f (diff) | |
download | UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.gz UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.lz UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.tar.xz UXP-6a3907dae474c7e1f31df13a26605278d3500a0d.zip |
Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
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 cd456eac2..325f711b7 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)); } |