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 ea4d9ff9a84367692c6ed0672561fcf4c7a4521a..cceb54e92d27ca61bd5ea66fd05b8733cc700a34 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp |
| @@ -453,7 +453,7 @@ void LayoutGrid::layoutBlock(bool relayoutChildren) |
| LayoutSize previousSize = size(); |
| updateLogicalWidth(); |
| - bool logicalHeightWasIndefinite = !hasDefiniteLogicalHeight(); |
| + m_hasDefiniteLogicalHeight = LayoutBlock::hasDefiniteLogicalHeight(); |
|
jfernandez
2016/09/15 07:27:11
As commented before, we shouldn't need to specify
svillar
2016/09/15 08:02:22
I would not initialize it this way, see my comment
|
| TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); |
| @@ -475,10 +475,10 @@ void LayoutGrid::layoutBlock(bool relayoutChildren) |
| // 2- Next, the track sizing algorithm resolves the sizes of the grid rows, using the |
| // grid column sizes calculated in the previous step. |
| - if (logicalHeightWasIndefinite) |
| - computeIntrinsicLogicalHeight(sizingData); |
| - else |
| + if (hasDefiniteLogicalHeight()) |
| computeTrackSizesForDirection(ForRows, sizingData, availableLogicalHeight(ExcludeMarginBorderPadding)); |
| + else |
| + computeIntrinsicLogicalHeight(sizingData); |
| setLogicalHeight(computeTrackBasedLogicalHeight(sizingData) + borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()); |
| LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| @@ -487,7 +487,7 @@ void LayoutGrid::layoutBlock(bool relayoutChildren) |
| // The above call might have changed the grid's logical height depending on min|max height restrictions. |
| // Update the sizes of the rows whose size depends on the logical height (also on definite|indefinite sizes). |
| LayoutUnit availableSpaceForRows = contentLogicalHeight(); |
| - if (logicalHeightWasIndefinite) |
| + if (!hasDefiniteLogicalHeight()) |
| computeTrackSizesForDirection(ForRows, sizingData, availableSpaceForRows); |
| // 3- If the min-content contribution of any grid items have changed based on the row |