Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r=jwatt, a=gchang DEVEDITION_56_0b3_RELEASE FENNEC_56_0b3_BUILD1 FENNEC_56_0b3_RELEASE FIREFOX_56_0b3_BUILD1 FIREFOX_56_0b3_RELEASE
authorJonathan Kingston <jkt@mozilla.com>
Thu, 10 Aug 2017 01:19:14 +0100
changeset 423587 efabe9b3a88e0cb1bcb092b34e0291ac99759471
parent 423586 dc46fc892938e6b8d449af75a129603ef55035c5
child 423588 80b89d2e694fa19961f86439aa508e196991fb14
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt, gchang
bugs1388907
milestone56.0
Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r=jwatt, a=gchang MozReview-Commit-ID: 7yHdgNfsrTc
layout/svg/SVGContextPaint.cpp
--- a/layout/svg/SVGContextPaint.cpp
+++ b/layout/svg/SVGContextPaint.cpp
@@ -59,17 +59,21 @@ SVGContextPaint::IsAllowedForImageFromUR
   nsAutoCString scheme;
   if (NS_SUCCEEDED(aURI->GetScheme(scheme)) &&
       (scheme.EqualsLiteral("chrome") || scheme.EqualsLiteral("resource"))) {
     return true;
   }
   RefPtr<BasePrincipal> principal = BasePrincipal::CreateCodebasePrincipal(aURI, OriginAttributes());
   nsString addonId;
   if (NS_SUCCEEDED(principal->GetAddonId(addonId))) {
-    return StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.org"));
+    if (StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.org"))
+        || StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.com"))
+        || StringBeginsWith(addonId, NS_LITERAL_STRING("@testpilot-"))) {
+      return true;
+    }
   }
   return false;
 }
 
 /**
  * Stores in |aTargetPaint| information on how to reconstruct the current
  * fill or stroke pattern. Will also set the paint opacity to transparent if
  * the paint is set to "none".