Bug 1401851 - Skip masked favicons in ContentLinkHandler until we support them. r=nanj
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 21 Sep 2017 10:02:38 +0200
changeset 669093 176e16629030869dfd6e31e240006f9ea70be2ba
parent 669092 3f6b16e6955ade31f6fe5b7a3dc5a5242a3a4c3b
child 669094 a76983d302deb17a97860a85bb37767866a73608
push id81210
push userkgupta@mozilla.com
push dateFri, 22 Sep 2017 14:09:59 +0000
reviewersnanj
bugs1401851
milestone58.0a1
Bug 1401851 - Skip masked favicons in ContentLinkHandler until we support them. r=nanj MozReview-Commit-ID: 99du7AD11x7
browser/modules/ContentLinkHandler.jsm
--- a/browser/modules/ContentLinkHandler.jsm
+++ b/browser/modules/ContentLinkHandler.jsm
@@ -293,18 +293,21 @@ this.ContentLinkHandler = {
           }
           break;
         case "icon":
           isRichIcon = false;
           // Fall through to rich icon handling
         case "apple-touch-icon":
         case "apple-touch-icon-precomposed":
         case "fluid-icon":
-          if (iconAdded || !Services.prefs.getBoolPref("browser.chrome.site_icons"))
+          if (link.hasAttribute("mask") || // Masked icons are not supported yet.
+              iconAdded ||
+              !Services.prefs.getBoolPref("browser.chrome.site_icons")) {
             break;
+          }
 
           iconAdded = handleFaviconLink(link, isRichIcon, chromeGlobal, faviconLoads);
           break;
         case "search":
           if (!searchAdded && event.type == "DOMLinkAdded") {
             var type = link.type && link.type.toLowerCase();
             type = type.replace(/^\s+|\s*(?:;.*)?$/g, "");