[CSS Parser] Support -webkit-text value for background-clip and -webkit-background...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Oct 2016 21:18:45 +0000 (21:18 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Oct 2016 21:18:45 +0000 (21:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164189

Reviewed by Dean Jackson.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBackgroundBox):
(WebCore::consumePrefixedBackgroundBox):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSPropertyParser.cpp

index 54aefc2..a159079 100644 (file)
@@ -1,3 +1,14 @@
+2016-10-29  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Support -webkit-text value for background-clip and -webkit-background-clip
+        https://bugs.webkit.org/show_bug.cgi?id=164189
+
+        Reviewed by Dean Jackson.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeBackgroundBox):
+        (WebCore::consumePrefixedBackgroundBox):
+
 2016-10-29  Joseph Pecoraro  <pecoraro@apple.com>
 
         Remove some unnecessary includes
index 8865db0..e782b71 100644 (file)
@@ -2535,7 +2535,7 @@ static RefPtr<CSSPrimitiveValue> consumeBackgroundAttachment(CSSParserTokenRange
 
 static RefPtr<CSSPrimitiveValue> consumeBackgroundBox(CSSParserTokenRange& range)
 {
-    return consumeIdent<CSSValueBorderBox, CSSValuePaddingBox, CSSValueContentBox>(range);
+    return consumeIdent<CSSValueBorderBox, CSSValuePaddingBox, CSSValueContentBox, CSSValueWebkitText>(range);
 }
 
 static RefPtr<CSSPrimitiveValue> consumeBackgroundComposite(CSSParserTokenRange& range)
@@ -2548,7 +2548,7 @@ static RefPtr<CSSPrimitiveValue> consumePrefixedBackgroundBox(CSSPropertyID prop
     // The values 'border', 'padding' and 'content' are deprecated and do not apply to the version of the property that has the -webkit- prefix removed.
     if (RefPtr<CSSPrimitiveValue> value = consumeIdentRange(range, CSSValueBorder, CSSValuePaddingBox))
         return value;
-    if ((property == CSSPropertyWebkitBackgroundClip || property == CSSPropertyWebkitMaskClip) && range.peek().id() == CSSValueText)
+    if (range.peek().id() == CSSValueWebkitText || ((property == CSSPropertyWebkitBackgroundClip || property == CSSPropertyWebkitMaskClip) && range.peek().id() == CSSValueText))
         return consumeIdent(range);
     return nullptr;
 }