Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1451883002: [css-grid] Store lines instead of tracks in GridResolvedPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ASSERT on the tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698