From 63308385c6f2b86db8a8baed4da91e012f94de36 Mon Sep 17 00:00:00 2001 From: Jonathan Kingston Date: Thu, 10 Aug 2017 01:19:14 +0100 Subject: [PATCH] Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r=jwatt MozReview-Commit-ID: 7yHdgNfsrTc --- layout/svg/SVGContextPaint.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layout/svg/SVGContextPaint.cpp b/layout/svg/SVGContextPaint.cpp index 7c47acb490cf..5d6e3b324982 100644 --- a/layout/svg/SVGContextPaint.cpp +++ b/layout/svg/SVGContextPaint.cpp @@ -64,7 +64,11 @@ SVGContextPaint::IsAllowedForImageFromURI(nsIURI* aURI) RefPtr 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; }