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

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: transform-function -> transfrom-list 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698