From 0cb3a0ccf18b2f763b856295c7cfa0a0c6b8941e Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 17 Jul 2018 10:24:21 +0200 Subject: Don't disable lightweight themes in PB mode. This resolves #640 --- toolkit/modules/LightweightThemeConsumer.jsm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'toolkit') 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; }, -- cgit v1.2.3