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

Unified Diff: third_party/WebKit/Source/core/layout/Grid.cpp

Issue 2670363003: [css-grid] Clamp the number of auto repeat tracks in all cases (Closed)
Patch Set: New version matching the specs Created 3 years, 10 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/layout/Grid.cpp
diff --git a/third_party/WebKit/Source/core/layout/Grid.cpp b/third_party/WebKit/Source/core/layout/Grid.cpp
index aa65a6c0aeee8eca2f49b03c132e8d9048a55987..580e1a108e3146eb3b306f06f3ad0f49d6fe8952 100644
--- a/third_party/WebKit/Source/core/layout/Grid.cpp
+++ b/third_party/WebKit/Source/core/layout/Grid.cpp
@@ -81,6 +81,10 @@ bool Grid::hasAnyGridItemPaintOrder() const {
void Grid::setAutoRepeatTracks(size_t autoRepeatRows,
size_t autoRepeatColumns) {
+ DCHECK_GE(static_cast<unsigned>(kGridMaxTracks),
+ numTracks(ForRows) + autoRepeatRows);
+ DCHECK_GE(static_cast<unsigned>(kGridMaxTracks),
+ numTracks(ForColumns) + autoRepeatColumns);
m_autoRepeatRows = autoRepeatRows;
m_autoRepeatColumns = autoRepeatColumns;
}

Powered by Google App Engine
This is Rietveld 408576698