Bug 1362120 - Always allow the 'context-fill'/'context-stroke' keywords in SVG <paint>. r=heycam
authorJonathan Watt <jwatt@jwatt.org>
Tue, 09 May 2017 09:36:09 +0100
changeset 410016 920a7465a372947b9b7ac096c6ae82a2449276e8
parent 409990 8bd3380db77f9c6cc5e3ee8f7adc84b939d6076a
child 410017 37a4d90166ba3efd9eea68ba98d1f5aa22384191
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1362120
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1362120 - Always allow the 'context-fill'/'context-stroke' keywords in SVG <paint>. r=heycam MozReview-Commit-ID: 2xY2NS4u8P0
layout/style/nsCSSParser.cpp
layout/style/test/test_bug798843_pref.html
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -17286,18 +17286,17 @@ CSSParserImpl::SetDefaultNamespaceOnSele
   }
 }
 
 bool
 CSSParserImpl::ParsePaint(nsCSSPropertyID aPropID)
 {
   nsCSSValue x, y;
 
-  if (ParseVariant(x, VARIANT_HC | VARIANT_NONE | VARIANT_URL |
-                      VARIANT_OPENTYPE_SVG_KEYWORD,
+  if (ParseVariant(x, VARIANT_HC | VARIANT_NONE | VARIANT_URL | VARIANT_KEYWORD,
                    nsCSSProps::kContextPatternKTable) != CSSParseResult::Ok) {
     return false;
   }
 
   bool hasFallback = false;
   bool canHaveFallback = x.GetUnit() == eCSSUnit_URL ||
                          x.GetUnit() == eCSSUnit_Enumerated;
   if (canHaveFallback) {
--- a/layout/style/test/test_bug798843_pref.html
+++ b/layout/style/test/test_bug798843_pref.html
@@ -8,18 +8,16 @@
   <title>Test that SVG glyph context-* values can be pref'ed off</title>
   <script src="/tests/SimpleTest/SimpleTest.js"></script>
 </head>
 <body>
 
 <script>
 
 var props = {
-  "fill" : "context-stroke none",
-  "stroke" : "context-fill none",
   "fillOpacity" : "context-stroke-opacity",
   "strokeOpacity" : "context-fill-opacity",
   "strokeDasharray" : "context-value",
   "strokeDashoffset" : "context-value",
   "strokeWidth" : "context-value"
 };
 
 function testDisabled() {