Bug 1450975 - Load themes without an accentcolor. r= draft
authorTim Nguyen <ntim.bugs@gmail.com>
Mon, 16 Apr 2018 10:24:48 +0200
changeset 782482 db6e46b96feddb308db0238ba19151c80c8d71ac
parent 782092 e233cb06379dfefa544fe2dbd4c82945b627cc70
push id106554
push userbmo:ntim.bugs@gmail.com
push dateMon, 16 Apr 2018 08:25:19 +0000
bugs1450975
milestone61.0a1
Bug 1450975 - Load themes without an accentcolor. r= MozReview-Commit-ID: 2EGsaajHZfM
toolkit/modules/LightweightThemeConsumer.jsm
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -128,17 +128,17 @@ LightweightThemeConsumer.prototype = {
     let root = this._doc.documentElement;
 
     if (aData.headerURL) {
       root.setAttribute("lwtheme-image", "true");
     } else {
       root.removeAttribute("lwtheme-image");
     }
 
-    let active = !!aData.accentcolor;
+    let active = aData.accentcolor || aData.headerURL;
     this._active = active;
 
     if (aData.icons) {
       let activeIcons = active ? Object.keys(aData.icons).join(" ") : "";
       root.setAttribute("lwthemeicons", activeIcons);
       for (let [name, value] of Object.entries(aData.icons)) {
         _setImage(root, active, name, value);
       }