Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
index 95d8ab2bef4852fcb067af87df29ca896ad12aa1..84458fd3894d8cd95f7451eef33e88975be4685d 100644 |
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
@@ -876,15 +876,10 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
case CSSPropertyListStyleImage: |
case CSSPropertyListStyle: |
case CSSPropertyPerspective: |
- validPrimitive = false; |
- break; |
- |
+ case CSSPropertyScrollSnapCoordinate: |
case CSSPropertyScrollSnapPointsX: |
case CSSPropertyScrollSnapPointsY: |
- parsedValue = parseScrollSnapPoints(); |
- break; |
- case CSSPropertyScrollSnapCoordinate: |
- parsedValue = parseScrollSnapCoordinate(); |
+ validPrimitive = false; |
break; |
default: |
@@ -1195,43 +1190,6 @@ bool CSSPropertyParser::parse4Values(CSSPropertyID propId, const CSSPropertyID * |
return true; |
} |
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapPoints() |
-{ |
- CSSParserValue* value = m_valueList->current(); |
- |
- if (value->id == CSSValueNone) { |
- m_valueList->next(); |
- return cssValuePool().createIdentifierValue(CSSValueNone); |
- } |
- |
- if (value->m_unit == CSSParserValue::Function && value->function->id == CSSValueRepeat) { |
- // The spec defines the following grammar: repeat( <length>) |
- CSSParserValueList* arguments = value->function->args.get(); |
- if (!arguments || arguments->size() != 1) |
- return nullptr; |
- |
- CSSParserValue* repeatValue = arguments->valueAt(0); |
- if (validUnit(repeatValue, FNonNeg | FLength | FPercent) && (m_parsedCalculation || repeatValue->fValue > 0)) { |
- RefPtrWillBeRawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueRepeat); |
- result->append(parseValidPrimitive(repeatValue->id, repeatValue)); |
- m_valueList->next(); |
- return result.release(); |
- } |
- } |
- |
- return nullptr; |
-} |
- |
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate() |
-{ |
- if (m_valueList->current()->id == CSSValueNone) { |
- m_valueList->next(); |
- return cssValuePool().createIdentifierValue(CSSValueNone); |
- } |
- |
- return parsePositionList(m_valueList); |
-} |
- |
PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColor(const CSSParserValue* value, bool acceptQuirkyColors) |
{ |
CSSValueID id = value->id; |
@@ -3318,37 +3276,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect() |
return CSSReflectValue::create(direction.release(), offset.release(), mask.release()); |
} |
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePosition(CSSParserValueList* valueList) |
-{ |
- RefPtrWillBeRawPtr<CSSValue> xValue = nullptr; |
- RefPtrWillBeRawPtr<CSSValue> yValue = nullptr; |
- parseFillPosition(valueList, xValue, yValue); |
- if (!xValue || !yValue) |
- return nullptr; |
- return CSSValuePair::create(xValue.release(), yValue.release(), CSSValuePair::KeepIdenticalValues); |
-} |
- |
-// Parses a list of comma separated positions. i.e., <position># |
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parsePositionList(CSSParserValueList* valueList) |
-{ |
- RefPtrWillBeRawPtr<CSSValueList> positions = CSSValueList::createCommaSeparated(); |
- while (true) { |
- // parsePosition consumes values until it reaches a separator [,/], |
- // an invalid token, or end of the list |
- RefPtrWillBeRawPtr<CSSValue> position = parsePosition(valueList); |
- if (!position) |
- return nullptr; |
- positions->append(position); |
- |
- if (!valueList->current()) |
- break; |
- if (!consumeComma(valueList) || !valueList->current()) |
- return nullptr; |
- } |
- |
- return positions.release(); |
-} |
- |
class BorderImageParseContext { |
STACK_ALLOCATED(); |
public: |