| 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 79a5db7d3dc98e9a934de6af2e47be51cf85064f..d6014bb20a5abe33cd8db05010c70cf91cedcedb 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| @@ -273,7 +273,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSProperty
|
| switch (propId) {
|
| case CSSPropertyJustifySelf:
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| - parsedValue = parseItemPositionOverflowPosition();
|
| + parsedValue = parseItemPositionOverflowPosition(propId);
|
| break;
|
| case CSSPropertyJustifyItems:
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| @@ -282,7 +282,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSProperty
|
| break;
|
|
|
| m_valueList->setCurrentIndex(0);
|
| - parsedValue = parseItemPositionOverflowPosition();
|
| + parsedValue = parseItemPositionOverflowPosition(propId);
|
| break;
|
| case CSSPropertyGridAutoFlow:
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| @@ -317,12 +317,12 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSProperty
|
|
|
| case CSSPropertyAlignSelf:
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| - parsedValue = parseItemPositionOverflowPosition();
|
| + parsedValue = parseItemPositionOverflowPosition(propId);
|
| break;
|
|
|
| case CSSPropertyAlignItems:
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| - parsedValue = parseItemPositionOverflowPosition();
|
| + parsedValue = parseItemPositionOverflowPosition(propId);
|
| break;
|
|
|
| // Everything else is handled in CSSPropertyParser.cpp
|
| @@ -2068,9 +2068,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseLegacyPosition()
|
| return CSSValuePair::create(cssValuePool().createIdentifierValue(CSSValueLegacy), cssValuePool().createIdentifierValue(value->id), CSSValuePair::DropIdenticalValues);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPosition()
|
| +PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPosition(CSSPropertyID propId)
|
| {
|
| - // auto | stretch | <baseline-position> | [<item-position> && <overflow-position>? ]
|
| + // auto | normal | stretch | <baseline-position> | [<item-position> && <overflow-position>? ]
|
| // <baseline-position> = baseline | last-baseline;
|
| // <item-position> = center | start | end | self-start | self-end | flex-start | flex-end | left | right;
|
| // <overflow-position> = unsafe | safe
|
| @@ -2078,7 +2078,10 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPos
|
| CSSParserValue* value = m_valueList->current();
|
| ASSERT(value);
|
|
|
| - if (value->id == CSSValueAuto || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) {
|
| + if (value->id == CSSValueAuto || value->id == CSSValueNormal || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) {
|
| + // align-items property does not allow the 'auto' value.
|
| + if (value->id == CSSValueAuto && propId == CSSPropertyAlignItems)
|
| + return nullptr;
|
| m_valueList->next();
|
| return cssValuePool().createIdentifierValue(value->id);
|
| }
|
|
|