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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 2834433003: WIP CSSPropertyParserHelpers::ConsumeCommaSeparatedList template (Closed)
Patch Set: Added more properties to new implementation Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index a0c37022a935fc21ba8da1523c000fba5367e2e0..01f0b92645dbcf85143a1131c5922bbed4017500 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1686,17 +1686,41 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
case CSSPropertyWebkitLocale:
return ConsumeLocale(range_);
case CSSPropertyAnimationDelay:
- case CSSPropertyTransitionDelay:
- case CSSPropertyAnimationDirection:
+ case CSSPropertyTransitionDelay: {
+ CSSValueList* list = CSSPropertyParserHelpers::ConsumeCommaSeparatedList(
+ range_, CSSPropertyParserHelpers::ConsumeTime, kValueRangeAll);
+ if (!IsValidAnimationPropertyList(property, *list))
+ return nullptr;
+ return list;
+ }
+ case CSSPropertyAnimationDirection: {
+ CSSValueList* list = CSSPropertyParserHelpers::ConsumeCommaSeparatedList(
+ range_, CSSPropertyParserHelpers::ConsumeIdent<
+ CSSValueNormal, CSSValueAlternate, CSSValueReverse,
+ CSSValueAlternateReverse>);
+ if (!IsValidAnimationPropertyList(property, *list))
+ return nullptr;
+ return list;
+ }
case CSSPropertyAnimationDuration:
case CSSPropertyTransitionDuration:
case CSSPropertyAnimationFillMode:
- case CSSPropertyAnimationIterationCount:
+ return ConsumeAnimationPropertyList(
+ property, range_, context_,
+ unresolved_property == CSSPropertyAliasWebkitAnimationName);
+ case CSSPropertyAnimationIterationCount: {
+ CSSValueList* list = CSSPropertyParserHelpers::ConsumeCommaSeparatedList(
+ range_, ConsumeAnimationIterationCount);
+ if (!IsValidAnimationPropertyList(property, *list))
+ return nullptr;
+ return list;
+ }
case CSSPropertyAnimationName:
case CSSPropertyAnimationPlayState:
case CSSPropertyTransitionProperty:
case CSSPropertyAnimationTimingFunction:
case CSSPropertyTransitionTimingFunction:
+ // TODO(bugsnash): change this from default
return ConsumeAnimationPropertyList(
property, range_, context_,
unresolved_property == CSSPropertyAliasWebkitAnimationName);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698