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..a2cf5af48d9feb0608c7a52f94a4aee9d221f88c 100644 |
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
@@ -2973,13 +2973,13 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, |
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 + 1))); |
} 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. |
@@ -2987,7 +2987,7 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, |
return false; |
// 3. The new area ends at the same position as the previously parsed area. |
- if (lookAheadCol != gridCoordinate.columns.resolvedFinalPosition.toInt()) |
+ if (lookAheadCol != gridCoordinate.columns.resolvedFinalPosition.prev().toInt()) |
return false; |
++gridCoordinate.rows.resolvedFinalPosition; |