| 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 eae576e89c50cee8cd40bc98a5d18b2e98f80fad..d7e457ab178931e28e9e93b50924b76ce8e27d2d 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| @@ -2966,20 +2966,20 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap,
|
|
|
| // We handle several grid areas with the same name at once to simplify the validation code.
|
| size_t lookAheadCol;
|
| - for (lookAheadCol = currentCol; lookAheadCol < (columnCount - 1); ++lookAheadCol) {
|
| - if (columnNames[lookAheadCol + 1] != gridAreaName)
|
| + for (lookAheadCol = currentCol + 1; lookAheadCol < columnCount; ++lookAheadCol) {
|
| + if (columnNames[lookAheadCol] != gridAreaName)
|
| break;
|
| }
|
|
|
| NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName);
|
| if (gridAreaIt == gridAreaMap.end()) {
|
| - gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount, rowCount), GridSpan(currentCol, lookAheadCol)));
|
| + gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount, rowCount + 1), GridSpan(currentCol, lookAheadCol)));
|
| } else {
|
| GridCoordinate& gridCoordinate = gridAreaIt->value;
|
|
|
| // The following checks test that the grid area is a single filled-in rectangle.
|
| // 1. The new row is adjacent to the previously parsed row.
|
| - if (rowCount != gridCoordinate.rows.resolvedFinalPosition.next().toInt())
|
| + if (rowCount != gridCoordinate.rows.resolvedFinalPosition.toInt())
|
| return false;
|
|
|
| // 2. The new area starts at the same position as the previously parsed area.
|
| @@ -2992,7 +2992,7 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap,
|
|
|
| ++gridCoordinate.rows.resolvedFinalPosition;
|
| }
|
| - currentCol = lookAheadCol;
|
| + currentCol = lookAheadCol - 1;
|
| }
|
|
|
| m_valueList->next();
|
|
|