[css-grid] Apply clamping of Automatic Minimum Size to spanning grid items too |
||
Issue description
We're not applying the clamping from Automatic Minimum Size [1]
when the item spans several tracks. Like in this example:
<div style="display: inline-grid; grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); border: solid thick;">
<div style="background: lime; grid-column: span 2">foobar</div>
</div>
Where the tracks should be 0px each.
In both Firefox and Edge the tracks are 0px each.
The size of the grid container varies between both browsers,
but that's a different topic.
[1] https://drafts.csswg.org/css-grid/#min-size-auto
,
Feb 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf68c01e132f774ee8da264d0d74909ae5c6652d commit bf68c01e132f774ee8da264d0d74909ae5c6652d Author: Manuel Rego Casasnovas <rego@igalia.com> Date: Fri Feb 09 11:01:06 2018 [css-grid] Apply automatic minimum size clamping to spanning items too In r783213 we added the conditions from the spec to apply the automatic minimum size clamping when required but only to non-spanning items. See: https://drafts.csswg.org/css-grid/#min-size-auto This patch moves the code from GridTrackSizingAlgorithm::SizeTrackToFitNonSpanningItem() to GridTrackSizingAlgorithmStrategy::MinSizeForChild() that way the clamping is applied for both spanning and non-spanning items. This somehow reverts r783213, as it was adding some duplicated code. All the checks to know if we should use that part of the spec were already present in GridTrackSizingAlgorithmStrategy::MinSizeForChild(). Apart from using the previous code, there's a new loop to verify that the max track sizing function is fixed for all the tracks of the item. BUG= 809005 TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html TEST=external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html Change-Id: I919a83d152d8263251d3211dd5ebf175f7cf9717 Reviewed-on: https://chromium-review.googlesource.com/910049 Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#535683} [modify] https://crrev.com/bf68c01e132f774ee8da264d0d74909ae5c6652d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html [modify] https://crrev.com/bf68c01e132f774ee8da264d0d74909ae5c6652d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html [add] https://crrev.com/bf68c01e132f774ee8da264d0d74909ae5c6652d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html [add] https://crrev.com/bf68c01e132f774ee8da264d0d74909ae5c6652d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html [modify] https://crrev.com/bf68c01e132f774ee8da264d0d74909ae5c6652d/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
,
Feb 9 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by r...@igalia.com
, Feb 8 2018