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

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

Issue 2888283006: CSS: Use count position values with 3 parts (Closed)
Patch Set: distinct use counters 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..8e17e52e8a2241271ad63681eeb5ff761284f38f 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1647,9 +1647,14 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
case CSSPropertyWebkitLogicalHeight:
return CSSPropertyLengthUtils::ConsumeWidthOrHeight(range_, *context_);
case CSSPropertyScrollSnapDestination:
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ PositionSyntax::kScrollSnapPoints);
case CSSPropertyObjectPosition:
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ PositionSyntax::kObjectPosition);
case CSSPropertyPerspectiveOrigin:
- return ConsumePosition(range_, context_->Mode(), UnitlessQuirk::kForbid);
+ return ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ PositionSyntax::kPerspectiveOrigin);
case CSSPropertyWebkitHyphenateCharacter:
case CSSPropertyWebkitLocale:
return ConsumeLocale(range_);
@@ -2610,8 +2615,8 @@ static bool ConsumeBackgroundPosition(CSSParserTokenRange& range,
do {
CSSValue* position_x = nullptr;
CSSValue* position_y = nullptr;
- if (!ConsumePosition(range, context->Mode(), unitless, position_x,
- position_y))
+ if (!ConsumePosition(range, *context, unitless, PositionSyntax::kBackground,
+ position_x, position_y))
return false;
AddBackgroundValue(result_x, position_x);
AddBackgroundValue(result_y, position_y);
@@ -2691,8 +2696,8 @@ bool CSSPropertyParser::ConsumeBackgroundShorthand(
ConsumeRepeatStyleComponent(range_, value, value_y, implicit);
} else if (property == CSSPropertyBackgroundPositionX ||
property == CSSPropertyWebkitMaskPositionX) {
- if (!ConsumePosition(range_, context_->Mode(), UnitlessQuirk::kForbid,
- value, value_y))
+ if (!ConsumePosition(range_, *context_, UnitlessQuirk::kForbid,
+ PositionSyntax::kBackground, value, value_y))
continue;
} else if (property == CSSPropertyBackgroundSize ||
property == CSSPropertyWebkitMaskSize) {

Powered by Google App Engine
This is Rietveld 408576698