Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| index 017e0dafe045673093764f7ac01a09e4b1f146a3..fc729252b1215b8b1d02fc93bfeccff8258c2c23 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| @@ -2042,6 +2042,12 @@ size_t LayoutGrid::computeAutoRepeatTracksCount( |
| if (needsToFulfillMinimumSize) |
| ++repetitions; |
| + // Clamp the number of repetitions so we don't end up with too many tracks |
|
Manuel Rego
2017/01/27 09:05:57
Nit: Missing dot after comment.
|
| + if (repetitions > kGridMaxTracks) { |
| + repetitions = |
| + (kGridMaxTracks - trackSizes.size()) / autoRepeatTrackListLength; |
|
eae
2017/01/26 17:07:23
I know we early return if autoRepeatTrackListLengt
|
| + } |
| + |
| return repetitions * autoRepeatTrackListLength; |
| } |