Bug 1401851 - Skip masked favicons in ContentLinkHandler until we support them. r=dolske draft
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 21 Sep 2017 10:02:38 +0200
changeset 668179 244fb71d0e89f0e80ebc647216145cf92b9dcdf6
parent 667637 0c49ebf4195ce51072b24aacf01eaaffdcff9be6
child 732615 7fe55ce9c6f5a1f41e152ce8a5e669ddb4b313f0
push id80954
push usermak77@bonardo.net
push dateThu, 21 Sep 2017 08:06:36 +0000
reviewersdolske
bugs1401851
milestone57.0a1
Bug 1401851 - Skip masked favicons in ContentLinkHandler until we support them. r=dolske MozReview-Commit-ID: 99du7AD11x7
browser/modules/ContentLinkHandler.jsm
--- a/browser/modules/ContentLinkHandler.jsm
+++ b/browser/modules/ContentLinkHandler.jsm
@@ -273,18 +273,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, "");