| 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 42b653c95eb54e4414c89f684a003bf87686a89f..1ac1d2d35d3cc99dcec4971c84193397ebd0a8ea 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
|
| @@ -749,13 +749,15 @@ GridTrackSize LayoutGrid::gridTrackSize(GridTrackSizingDirection direction, size
|
| GridLength maxTrackBreadth = trackSize.maxTrackBreadth();
|
|
|
| // If the logical width/height of the grid container is indefinite, percentage values are treated as <auto>.
|
| - // For the inline axis this only happens when we're computing the intrinsic sizes (AvailableSpaceIndefinite).
|
| - // For the block axis we check that the percentage height is resolvable on the first in-flow child.
|
| - if ((sizingOperation == IntrinsicSizeComputation) || (direction == ForRows && firstInFlowChildBox() && !firstInFlowChildBox()->percentageLogicalHeightIsResolvable())) {
|
| - if (minTrackBreadth.hasPercentage())
|
| - minTrackBreadth = Length(Auto);
|
| - if (maxTrackBreadth.hasPercentage())
|
| - maxTrackBreadth = Length(Auto);
|
| + if (minTrackBreadth.hasPercentage() || maxTrackBreadth.hasPercentage()) {
|
| + // For the inline axis this only happens when we're computing the intrinsic sizes (AvailableSpaceIndefinite).
|
| + // For the block axis we check that the percentage height is resolvable on the first in-flow child.
|
| + if ((sizingOperation == IntrinsicSizeComputation) || (direction == ForRows && firstInFlowChildBox() && !firstInFlowChildBox()->percentageLogicalHeightIsResolvable())) {
|
| + if (minTrackBreadth.hasPercentage())
|
| + minTrackBreadth = Length(Auto);
|
| + if (maxTrackBreadth.hasPercentage())
|
| + maxTrackBreadth = Length(Auto);
|
| + }
|
| }
|
|
|
| // Flex sizes are invalid as a min sizing function. However we still can have a flexible |minTrackBreadth|
|
|
|