| Index: Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
|
| index 119ea6bf959ffa64c81bf48d7c10d1bf913d9a73..9e55d7a13c03abd3f622adea1e1180b8e9e89afa 100644
|
| --- a/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -3443,27 +3443,26 @@ bool CSSPropertyParser::parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>
|
|
|
| void CSSPropertyParser::maybeParseGridLineNames(CSSParserValueList& inputList, CSSValueList& valueList, CSSGridLineNamesValue* previousNamedAreaTrailingLineNames)
|
| {
|
| - if (!inputList.current() || inputList.current()->unit != CSSParserValue::ValueList)
|
| + if (!inputList.current() || inputList.current()->unit != CSSParserValue::Operator || inputList.current()->iValue != '[')
|
| return;
|
|
|
| - CSSParserValueList* identList = inputList.current()->valueList;
|
| - if (!identList->size()) {
|
| - inputList.next();
|
| - return;
|
| - }
|
| -
|
| - // Need to ensure the identList is at the heading index, since the parserList might have been rewound.
|
| - identList->setCurrentIndex(0);
|
| + // Skip '['
|
| + inputList.next();
|
|
|
| RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames;
|
| if (!lineNames)
|
| lineNames = CSSGridLineNamesValue::create();
|
| - while (CSSParserValue* identValue = identList->current()) {
|
| +
|
| + while (CSSParserValue* identValue = inputList.current()) {
|
| + if (identValue->unit == CSSParserValue::Operator && identValue->iValue == ']')
|
| + break;
|
| +
|
| if (identValue->unit != CSSPrimitiveValue::CSS_IDENT)
|
| return;
|
| +
|
| RefPtrWillBeRawPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomIdentValue(identValue);
|
| lineNames->append(lineName.release());
|
| - identList->next();
|
| + inputList.next();
|
| }
|
| if (!previousNamedAreaTrailingLineNames)
|
| valueList.append(lineNames.release());
|
|
|