| 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..16481de35e7f39ff15dc10cffea1bf5fef404485 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| @@ -2042,6 +2042,13 @@ size_t LayoutGrid::computeAutoRepeatTracksCount(
|
| if (needsToFulfillMinimumSize)
|
| ++repetitions;
|
|
|
| + // Clamp the number of repetitions so we don't end up with too many tracks.
|
| + if (repetitions > kGridMaxTracks) {
|
| + DCHECK_GT(autoRepeatTrackListLength, 0u);
|
| + repetitions =
|
| + (kGridMaxTracks - trackSizes.size()) / autoRepeatTrackListLength;
|
| + }
|
| +
|
| return repetitions * autoRepeatTrackListLength;
|
| }
|
|
|
|
|