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

Unified Diff: third_party/WebKit/Source/core/style/GridPositionsResolver.cpp

Issue 2080643002: [css-grid] Implement repeat(auto-fit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build (debug) fix Created 4 years, 6 months 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/style/GridPositionsResolver.cpp
diff --git a/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp b/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp
index 23cb2441a32c27618d6fe0ee72511cd86234b7e0..fdd67771906704f42c210ab0e26976796ba52e43 100644
--- a/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp
+++ b/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp
@@ -34,7 +34,7 @@ NamedLineCollection::NamedLineCollection(const ComputedStyle& gridContainerStyle
}
if (!autoRepeatGridLineNames.isEmpty()) {
- auto it = autoRepeatGridLineNames.find(namedLine);
+ auto it = m_repetitions ? autoRepeatGridLineNames.find(namedLine) : autoRepeatGridLineNames.end();
m_autoRepeatNamedLinesIndexes = it == autoRepeatGridLineNames.end() ? nullptr : &it->value;
}
@@ -327,7 +327,7 @@ static int resolveGridPositionFromStyle(const ComputedStyle& gridContainerStyle,
if (explicitLines.hasNamedLines())
return explicitLines.firstPosition();
- ASSERT(!NamedLineCollection::isValidNamedLineOrArea(namedGridLine, gridContainerStyle, side));
+ DCHECK(!NamedLineCollection::isValidNamedLineOrArea(namedGridLine, gridContainerStyle, side) || !autoRepeatTracksCount);
// If none of the above works specs mandate to assume that all the lines in the implicit grid have this name.
return lastLine + 1;
}

Powered by Google App Engine
This is Rietveld 408576698