[CSS Parser] Fix calc() with -webkit-line-clamp
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 20:11:03 +0000 (20:11 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 20:11:03 +0000 (20:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165398

Reviewed by Zalan Bujtas.

Remove the aggressive token type checking up front, since it was causing calc() to not
be allowed.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeLineClamp):

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

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

index 12fa143..84921af 100644 (file)
@@ -1,5 +1,18 @@
 2016-12-05  Dave Hyatt  <hyatt@apple.com>
 
+        [CSS Parser] Fix calc() with -webkit-line-clamp
+        https://bugs.webkit.org/show_bug.cgi?id=165398
+
+        Reviewed by Zalan Bujtas.
+
+        Remove the aggressive token type checking up front, since it was causing calc() to not
+        be allowed.
+
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeLineClamp):
+
+2016-12-05  Dave Hyatt  <hyatt@apple.com>
+
         [CSS Parser] Support -webkit-text-decoration
         https://bugs.webkit.org/show_bug.cgi?id=165391
 
index 7a9e8df..2814ce2 100644 (file)
@@ -1204,8 +1204,6 @@ static RefPtr<CSSValue> consumeTouchAction(CSSParserTokenRange& range)
 
 static RefPtr<CSSPrimitiveValue> consumeLineClamp(CSSParserTokenRange& range)
 {
-    if (range.peek().type() != PercentageToken && range.peek().type() != NumberToken)
-        return nullptr;
     RefPtr<CSSPrimitiveValue> clampValue = consumePercent(range, ValueRangeNonNegative);
     if (clampValue)
         return clampValue;