diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-02 04:25:47 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:26:25 +0200 |
commit | 73289f53892c4c48eedf8de5a40af74ff9b55a09 (patch) | |
tree | c3991d265b47fad7c75cf45812ac1963103ccf7b /toolkit/modules/LightweightThemeConsumer.jsm | |
parent | 4acc0d58cb0fa989d609972493be363c105f2594 (diff) | |
download | UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.gz UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.lz UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.tar.xz UXP-73289f53892c4c48eedf8de5a40af74ff9b55a09.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)); } |