From 73289f53892c4c48eedf8de5a40af74ff9b55a09 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 2 Feb 2020 04:25:47 -0500 Subject: Issue #65 - Remove AppConstants from toolkit/modules Except for secondscreen --- toolkit/modules/LightweightThemeConsumer.jsm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'toolkit/modules/LightweightThemeConsumer.jsm') 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)); } -- cgit v1.2.3