| 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 ed0bab93d0ca7006d76336e05df4913093ec5b7c..76edf7bc7305eae3c9a29efde9e58556c2c9ef0f 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| @@ -431,10 +431,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| Units unitless = FUnknown;
|
|
|
| switch (propId) {
|
| - case CSSPropertySize: // <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
|
| - parsedValue = parseSize();
|
| - break;
|
| -
|
| case CSSPropertyContent: // [ <string> | <uri> | <counter> | attr(X) | open-quote |
|
| // close-quote | no-open-quote | no-close-quote ]+ | inherit
|
| parsedValue = parseContent();
|
| @@ -1357,6 +1353,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| case CSSPropertyBorderSpacing:
|
| case CSSPropertyCounterIncrement:
|
| case CSSPropertyCounterReset:
|
| + case CSSPropertySize:
|
| validPrimitive = false;
|
| break;
|
|
|
| @@ -1900,72 +1897,6 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate()
|
| return parsePositionList(m_valueList);
|
| }
|
|
|
| -// <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
|
| -PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseSize()
|
| -{
|
| - CSSParserValue* value = m_valueList->current();
|
| - ASSERT(value);
|
| -
|
| - RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
|
| -
|
| - // First parameter.
|
| - SizeParameterType paramType = parseSizeParameter(parsedValues.get(), value, None);
|
| - if (paramType == None)
|
| - return nullptr;
|
| - value = m_valueList->next();
|
| -
|
| - // Second parameter, if any.
|
| - if (value) {
|
| - paramType = parseSizeParameter(parsedValues.get(), value, paramType);
|
| - if (paramType == None)
|
| - return nullptr;
|
| - m_valueList->next();
|
| - }
|
| -
|
| - return parsedValues.release();
|
| -}
|
| -
|
| -CSSPropertyParser::SizeParameterType CSSPropertyParser::parseSizeParameter(CSSValueList* parsedValues, CSSParserValue* value, SizeParameterType prevParamType)
|
| -{
|
| - switch (value->id) {
|
| - case CSSValueAuto:
|
| - if (prevParamType == None) {
|
| - parsedValues->append(cssValuePool().createIdentifierValue(value->id));
|
| - return Auto;
|
| - }
|
| - return None;
|
| - case CSSValueLandscape:
|
| - case CSSValuePortrait:
|
| - if (prevParamType == None || prevParamType == PageSize) {
|
| - parsedValues->append(cssValuePool().createIdentifierValue(value->id));
|
| - return Orientation;
|
| - }
|
| - return None;
|
| - case CSSValueA3:
|
| - case CSSValueA4:
|
| - case CSSValueA5:
|
| - case CSSValueB4:
|
| - case CSSValueB5:
|
| - case CSSValueLedger:
|
| - case CSSValueLegal:
|
| - case CSSValueLetter:
|
| - if (prevParamType == None || prevParamType == Orientation) {
|
| - // Normalize to Page Size then Orientation order by prepending for simpler StyleBuilder handling
|
| - parsedValues->prepend(cssValuePool().createIdentifierValue(value->id));
|
| - return PageSize;
|
| - }
|
| - return None;
|
| - case 0:
|
| - if (validUnit(value, FLength | FNonNeg) && (prevParamType == None || prevParamType == Length)) {
|
| - parsedValues->append(createPrimitiveNumericValue(value));
|
| - return Length;
|
| - }
|
| - return None;
|
| - default:
|
| - return None;
|
| - }
|
| -}
|
| -
|
| // [ <string> | <uri> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
|
| // in CSS 2.1 this got somewhat reduced:
|
| // [ <string> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
|
|
|