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 8dd1e0729d5a418812e5dafeceb0f68de325627a..167e8ef33a8e3a14f555ae3ede96f9ec91546c87 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -3084,7 +3084,7 @@ static CSSPrimitiveValue* consumeSelfPositionKeyword(CSSParserTokenRange& range) |
static CSSValue* consumeSelfPositionOverflowPosition(CSSParserTokenRange& range) |
{ |
- if (identMatches<CSSValueAuto, CSSValueStretch, CSSValueBaseline, CSSValueLastBaseline>(range.peek().id())) |
+ if (identMatches<CSSValueAuto, CSSValueNormal, CSSValueStretch, CSSValueBaseline, CSSValueLastBaseline>(range.peek().id())) |
return consumeIdent(range); |
CSSPrimitiveValue* overflowPosition = consumeIdent<CSSValueUnsafe, CSSValueSafe>(range); |
@@ -3098,6 +3098,14 @@ static CSSValue* consumeSelfPositionOverflowPosition(CSSParserTokenRange& range) |
return selfPosition; |
} |
+static CSSValue* consumeAlignItems(CSSParserTokenRange& range) |
+{ |
+ // align-items property does not allow the 'auto' value. |
+ if (identMatches<CSSValueAuto>(range.peek().id())) |
+ return nullptr; |
+ return consumeSelfPositionOverflowPosition(range); |
+} |
+ |
static CSSValue* consumeJustifyItems(CSSParserTokenRange& range) |
{ |
CSSParserTokenRange rangeCopy = range; |
@@ -3810,9 +3818,11 @@ CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty, |
case CSSPropertyWebkitMaskRepeatX: |
case CSSPropertyWebkitMaskRepeatY: |
return nullptr; |
+ case CSSPropertyAlignItems: |
+ ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
+ return consumeAlignItems(m_range); |
case CSSPropertyJustifySelf: |
case CSSPropertyAlignSelf: |
- case CSSPropertyAlignItems: |
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
return consumeSelfPositionOverflowPosition(m_range); |
case CSSPropertyJustifyItems: |