Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r?dao
MozReview-Commit-ID: 7yHdgNfsrTc
--- 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".