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 e401dbfd8a3093eefbf3646d26786cf9e3b13ec4..23cb2441a32c27618d6fe0ee72511cd86234b7e0 100644 |
--- a/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp |
+++ b/third_party/WebKit/Source/core/style/GridPositionsResolver.cpp |
@@ -207,12 +207,12 @@ static GridSpan definiteGridSpanWithNamedSpanAgainstOpposite(int oppositeLine, c |
size_t GridPositionsResolver::explicitGridColumnCount(const ComputedStyle& gridContainerStyle, size_t autoRepeatTracksCount) |
{ |
- return std::min<size_t>(gridContainerStyle.gridTemplateColumns().size() + autoRepeatTracksCount, kGridMaxTracks); |
+ return std::min<size_t>(std::max(gridContainerStyle.gridTemplateColumns().size() + autoRepeatTracksCount, gridContainerStyle.namedGridAreaColumnCount()), kGridMaxTracks); |
} |
size_t GridPositionsResolver::explicitGridRowCount(const ComputedStyle& gridContainerStyle, size_t autoRepeatTracksCount) |
{ |
- return std::min<size_t>(gridContainerStyle.gridTemplateRows().size() + autoRepeatTracksCount, kGridMaxTracks); |
+ return std::min<size_t>(std::max(gridContainerStyle.gridTemplateRows().size() + autoRepeatTracksCount, gridContainerStyle.namedGridAreaRowCount()), kGridMaxTracks); |
} |
static size_t explicitGridSizeForSide(const ComputedStyle& gridContainerStyle, GridPositionSide side, size_t autoRepeatTracksCount) |