Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp

Issue 2951763002: CSS Properties & Values API: replace transform-function with transform-list. (Closed)
Patch Set: move Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ad063fc53c605bfb5fd7b8f35f5710f34739df95 100644
--- a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
@@ -57,8 +57,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 +122,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 +174,8 @@ 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 ConsumeTransformList(range, *context);
case CSSSyntaxType::kCustomIdent:
return ConsumeCustomIdent(range);
default:

Powered by Google App Engine
This is Rietveld 408576698