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

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

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)
Patch Set: two color-stop for conic-gradient example Created 3 years, 7 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/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 e29b3bc6b9d72f12275fb08782efe52e328bda78..9e3d7dda88366a8731e552b5f952c06d693cc5b5 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1647,9 +1647,15 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
case CSSPropertyWebkitLogicalHeight:
return CSSPropertyLengthUtils::ConsumeWidthOrHeight(range_, *context_);
case CSSPropertyScrollSnapDestination:
+ // TODO(crbug.com/724912): Retire scroll-snap-destination
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ UseCounter::kNumberOfFeatures);
Bugs Nash 2017/05/22 23:07:09 for readability, could we create a named constant
Eric Willigers 2017/05/23 03:20:01 Done.
case CSSPropertyObjectPosition:
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ UseCounter::kThreeValuedPositionObjectPosition);
case CSSPropertyPerspectiveOrigin:
- return ConsumePosition(range_, context_->Mode(), UnitlessQuirk::kForbid);
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ UseCounter::kThreeValuedPositionPerspectiveOrigin);
case CSSPropertyWebkitHyphenateCharacter:
case CSSPropertyWebkitLocale:
return ConsumeLocale(range_);
@@ -2610,7 +2616,8 @@ static bool ConsumeBackgroundPosition(CSSParserTokenRange& range,
do {
CSSValue* position_x = nullptr;
CSSValue* position_y = nullptr;
- if (!ConsumePosition(range, context->Mode(), unitless, position_x,
+ if (!ConsumePosition(range, *context, unitless,
+ UseCounter::kThreeValuedPositionBackground, position_x,
position_y))
return false;
AddBackgroundValue(result_x, position_x);
@@ -2691,7 +2698,8 @@ bool CSSPropertyParser::ConsumeBackgroundShorthand(
ConsumeRepeatStyleComponent(range_, value, value_y, implicit);
} else if (property == CSSPropertyBackgroundPositionX ||
property == CSSPropertyWebkitMaskPositionX) {
- if (!ConsumePosition(range_, context_->Mode(), UnitlessQuirk::kForbid,
+ if (!ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ UseCounter::kThreeValuedPositionBackground,
value, value_y))
continue;
} else if (property == CSSPropertyBackgroundSize ||

Powered by Google App Engine
This is Rietveld 408576698