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 || |