Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp |
| diff --git a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp |
| index da74bdea7bdf1ce298f19793f12e8ccd2ee4a7ec..d02721c29aaa46257d6731bd674a847ab3d8e994 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp |
| +++ b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp |
| @@ -12,8 +12,10 @@ |
| #include "core/css/CSSValueList.h" |
| #include "core/css/CSSVariableReferenceValue.h" |
| #include "core/css/parser/CSSParserIdioms.h" |
| +#include "core/css/parser/CSSParserLocalContext.h" |
| #include "core/css/parser/CSSPropertyParserHelpers.h" |
| #include "core/css/parser/CSSVariableParser.h" |
| +#include "core/css/properties/CSSPropertyAPITransform.h" |
| #include "core/html/parser/HTMLParserIdioms.h" |
| namespace blink { |
| @@ -57,8 +59,8 @@ CSSSyntaxType ParseSyntaxType(String type) { |
| return CSSSyntaxType::kTime; |
| if (type == "resolution") |
| return CSSSyntaxType::kResolution; |
| - if (type == "transform-function") |
| - return CSSSyntaxType::kTransformFunction; |
| + if (type == "transform-list") |
| + return CSSSyntaxType::kTransformList; |
| if (type == "custom-ident") |
| return CSSSyntaxType::kCustomIdent; |
| // Not an Ident, just used to indicate failure |
| @@ -122,6 +124,12 @@ CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input) { |
| } |
| bool repeatable = ConsumeCharacterAndWhitespace(input, '+', offset); |
| + // <transform-list> is already a space separated list, |
| + // <transform-list>+ is invalid. |
| + if (type == CSSSyntaxType::kTransformList && repeatable) { |
| + syntax_components_.clear(); |
| + return; |
| + } |
| ConsumeWhitespace(input, offset); |
| syntax_components_.push_back(CSSSyntaxComponent(type, ident, repeatable)); |
| @@ -168,8 +176,9 @@ const CSSValue* ConsumeSingleType(const CSSSyntaxComponent& syntax, |
| return ConsumeTime(range, ValueRange::kValueRangeAll); |
| case CSSSyntaxType::kResolution: |
| return ConsumeResolution(range); |
| - case CSSSyntaxType::kTransformFunction: |
| - return nullptr; // TODO(timloh): Implement this. |
| + case CSSSyntaxType::kTransformList: |
| + return CSSPropertyAPITransform::parseSingleValue(range, *context, |
| + CSSParserLocalContext()); |
|
meade_UTC10
2017/06/21 06:57:44
I had a discussion with the team - and we decided
Hwanseung Lee
2017/06/22 00:39:53
i made CSSPropertyTransformUtils files(it was copi
|
| case CSSSyntaxType::kCustomIdent: |
| return ConsumeCustomIdent(range); |
| default: |