| Index: third_party/WebKit/Source/core/css/properties/CSSPropertyOffsetPathUtils.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyOffsetPathUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyOffsetPathUtils.cpp
|
| index 1cbdbcfd462cea8fb2d27713570153d7a50d63e8..2b102dae4730aff587e9dbd0d52cc2ebaae40011 100644
|
| --- a/third_party/WebKit/Source/core/css/properties/CSSPropertyOffsetPathUtils.cpp
|
| +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyOffsetPathUtils.cpp
|
| @@ -15,6 +15,8 @@
|
|
|
| namespace blink {
|
|
|
| +using namespace CSSPropertyParserHelpers;
|
| +
|
| namespace {
|
|
|
| CSSValue* ConsumePath(CSSParserTokenRange& range) {
|
| @@ -23,8 +25,7 @@ CSSValue* ConsumePath(CSSParserTokenRange& range) {
|
| return nullptr;
|
|
|
| CSSParserTokenRange function_range = range;
|
| - CSSParserTokenRange function_args =
|
| - CSSPropertyParserHelpers::ConsumeFunction(function_range);
|
| + CSSParserTokenRange function_args = ConsumeFunction(function_range);
|
|
|
| if (function_args.Peek().GetType() != kStringToken)
|
| return nullptr;
|
| @@ -44,31 +45,31 @@ CSSValue* ConsumePath(CSSParserTokenRange& range) {
|
| return CSSPathValue::Create(std::move(byte_stream));
|
| }
|
|
|
| -CSSValue* ConsumeRay(CSSParserTokenRange& range) {
|
| +CSSValue* ConsumeRay(CSSParserTokenRange& range,
|
| + const CSSParserContext* context) {
|
| DCHECK_EQ(range.Peek().FunctionId(), CSSValueRay);
|
| CSSParserTokenRange function_range = range;
|
| - CSSParserTokenRange function_args =
|
| - CSSPropertyParserHelpers::ConsumeFunction(function_range);
|
| + CSSParserTokenRange function_args = ConsumeFunction(function_range);
|
|
|
| CSSPrimitiveValue* angle = nullptr;
|
| CSSIdentifierValue* size = nullptr;
|
| CSSIdentifierValue* contain = nullptr;
|
| while (!function_args.AtEnd()) {
|
| if (!angle) {
|
| - angle = CSSPropertyParserHelpers::ConsumeAngle(function_args);
|
| + angle = ConsumeAngle(function_args, *context, UnitlessQuirk::kForbid,
|
| + WTF::Optional<UseCounter::Feature>());
|
| if (angle)
|
| continue;
|
| }
|
| if (!size) {
|
| - size = CSSPropertyParserHelpers::ConsumeIdent<
|
| - CSSValueClosestSide, CSSValueClosestCorner, CSSValueFarthestSide,
|
| - CSSValueFarthestCorner, CSSValueSides>(function_args);
|
| + size = ConsumeIdent<CSSValueClosestSide, CSSValueClosestCorner,
|
| + CSSValueFarthestSide, CSSValueFarthestCorner,
|
| + CSSValueSides>(function_args);
|
| if (size)
|
| continue;
|
| }
|
| if (RuntimeEnabledFeatures::cssOffsetPathRayContainEnabled() && !contain) {
|
| - contain = CSSPropertyParserHelpers::ConsumeIdent<CSSValueContain>(
|
| - function_args);
|
| + contain = ConsumeIdent<CSSValueContain>(function_args);
|
| if (contain)
|
| continue;
|
| }
|
| @@ -88,7 +89,7 @@ CSSValue* CSSPropertyOffsetPathUtils::ConsumeOffsetPath(
|
| CSSValue* value = nullptr;
|
| if (RuntimeEnabledFeatures::cssOffsetPathRayEnabled() &&
|
| range.Peek().FunctionId() == CSSValueRay)
|
| - value = ConsumeRay(range);
|
| + value = ConsumeRay(range, context);
|
| else
|
| value = ConsumePathOrNone(range);
|
|
|
| @@ -102,7 +103,7 @@ CSSValue* CSSPropertyOffsetPathUtils::ConsumePathOrNone(
|
| CSSParserTokenRange& range) {
|
| CSSValueID id = range.Peek().Id();
|
| if (id == CSSValueNone)
|
| - return CSSPropertyParserHelpers::ConsumeIdent(range);
|
| + return ConsumeIdent(range);
|
|
|
| return ConsumePath(range);
|
| }
|
|
|