summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/LightweightThemeConsumer.jsm
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-17 10:24:21 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-17 10:24:21 +0200
commit0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e (patch)
tree8f90e2c31297a9b17984ec9de38668ef0846f549 /toolkit/modules/LightweightThemeConsumer.jsm
parent57e08f8dd67870662c2021fd7603a966bed44343 (diff)
downloadUXP-0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e.tar
UXP-0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e.tar.gz
UXP-0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e.tar.lz
UXP-0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e.tar.xz
UXP-0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e.zip
Don't disable lightweight themes in PB mode.
This resolves #640
Diffstat (limited to 'toolkit/modules/LightweightThemeConsumer.jsm')
-rw-r--r--toolkit/modules/LightweightThemeConsumer.jsm10
1 files changed, 8 insertions, 2 deletions
diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm
index 1dd4c976a..cd456eac2 100644
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -22,10 +22,12 @@ this.LightweightThemeConsumer =
this._win = aDocument.defaultView;
this._footerId = aDocument.documentElement.getAttribute("lightweightthemesfooter");
+/* XXX: If we want to disable LWTs for PB mode, this would be needed.
+ * Perhaps make this pref-controlled in the future if people want it?
if (PrivateBrowsingUtils.isWindowPrivate(this._win) &&
!PrivateBrowsingUtils.permanentPrivateBrowsing) {
return;
- }
+ } */
let screen = this._win.screen;
this._lastScreenWidth = screen.width;
@@ -87,12 +89,16 @@ LightweightThemeConsumer.prototype = {
},
destroy: function () {
+/* XXX: If we want to disable LWTs for PB mode, this would be needed.
if (!PrivateBrowsingUtils.isWindowPrivate(this._win) ||
PrivateBrowsingUtils.permanentPrivateBrowsing) {
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
this._win.removeEventListener("resize", this);
- }
+ } */
+
+ Services.obs.removeObserver(this, "lightweight-theme-styling-update");
+ this._win.removeEventListener("resize", this);
this._win = this._doc = null;
},