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 6fe47f228470057c49d82480d02fdb3d9e35ff00..569fa147dc32d8fdf0c7ba771673be6df0f87a12 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -3299,41 +3299,20 @@ bool CSSPropertyParser::consumeGridShorthand(bool important) { |
return true; |
} |
-static CSSValue* consumeSimplifiedContentPosition(CSSParserTokenRange& range) { |
- CSSValueID id = range.peek().id(); |
- if (identMatches<CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline>( |
- id)) { |
- return CSSContentDistributionValue::create( |
- CSSValueInvalid, range.consumeIncludingWhitespace().id(), |
- CSSValueInvalid); |
- } |
- if (identMatches<CSSValueSpaceBetween, CSSValueSpaceAround, |
- CSSValueSpaceEvenly, CSSValueStretch>(id)) { |
- return CSSContentDistributionValue::create( |
- range.consumeIncludingWhitespace().id(), CSSValueInvalid, |
- CSSValueInvalid); |
- } |
- if (identMatches<CSSValueStart, CSSValueEnd, CSSValueCenter, |
- CSSValueFlexStart, CSSValueFlexEnd, CSSValueLeft, |
- CSSValueRight>(id)) { |
- return CSSContentDistributionValue::create( |
- CSSValueInvalid, range.consumeIncludingWhitespace().id(), |
- CSSValueInvalid); |
- } |
- return nullptr; |
-} |
- |
bool CSSPropertyParser::consumePlaceContentShorthand(bool important) { |
DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
DCHECK_EQ(shorthandForProperty(CSSPropertyPlaceContent).length(), |
static_cast<unsigned>(2)); |
- CSSValue* alignContentValue = consumeSimplifiedContentPosition(m_range); |
+ CSSValue* alignContentValue = |
+ CSSPropertyAlignmentUtils::consumeSimplifiedContentPosition(m_range); |
if (!alignContentValue) |
return false; |
CSSValue* justifyContentValue = |
- m_range.atEnd() ? alignContentValue |
- : consumeSimplifiedContentPosition(m_range); |
+ m_range.atEnd() |
+ ? alignContentValue |
+ : CSSPropertyAlignmentUtils::consumeSimplifiedContentPosition( |
+ m_range); |
if (!justifyContentValue) |
return false; |
if (!m_range.atEnd()) |