Skip to content

Commit

Permalink
[css-grid] Move stretch of "auto" tracks into the track sizing algorithm
Browse files Browse the repository at this point in the history
CSS WG has agreed to modify the track sizing algorithm to include
a new step: https://drafts.csswg.org/css-grid/#algo-stretch
We used to do the stretch of the "auto" tracks at the end of
the track sizing algorithm, however this change integrates it
into the algorithm itself as the last step.
See: w3c/csswg-drafts#1150

The patch moves the method
LayoutGrid::ApplyStretchAlignmentToTracksIfNeeded() to
GridTrackSizingAlgorithm::StretchAutoTracksIfNeeded().
And then modifies the grid track sizing algorithm to execute
the new step.

This also modifies the test to check the new expected behavior.

BUG=763386
TEST=external/wpt/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html

Change-Id: Ieb31e822989ae4655d0e632885215e4a032dd445
Reviewed-on: https://chromium-review.googlesource.com/657578
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Reviewed-by: Sergio Villar <svillar@igalia.com>
Reviewed-by: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#501249}
  • Loading branch information
mrego authored and chromium-wpt-export-bot committed Sep 12, 2017
1 parent 1b359be commit 18fc9f6
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -68,14 +68,14 @@
function runTests() {
checkGridSizeTracksAndImageSize("grid-1", "img-1", "200px", "200px", "200px", "200px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-2", "img-2", "10px", "10px", "200px", "200px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-3", "img-3", "200px", "50px", "200px", "50px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-4", "img-4", "200px", "10px", "200px", "50px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-3", "img-3", "200px", "200px", "200px", "200px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-4", "img-4", "200px", "10px", "200px", "200px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-5", "img-5", "200px", "50px", "50px", "50px", "50px", "50px");
checkGridSizeTracksAndImageSize("grid-6", "img-6", "200px", "10px", "50px", "50px", "50px", "50px");
checkGridSizeTracksAndImageSize("grid-7", "img-7", "200px", "225px", "200px", "200px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-8", "img-8", "10px", "10px", "200px", "200px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-9", "img-9", "200px", "125px", "200px", "100px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-10", "img-10", "200px", "10px", "200px", "100px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-9", "img-9", "200px", "225px", "200px", "200px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-10", "img-10", "200px", "10px", "200px", "200px 25px", "200px", "200px");
checkGridSizeTracksAndImageSize("grid-11", "img-11", "200px", "125px", "100px", "100px 25px", "100px", "100px");
checkGridSizeTracksAndImageSize("grid-12", "img-12", "200px", "10px", "100px", "100px 25px", "100px", "100px");
checkGridSizeTracksAndImageSize("grid-13", "img-13", "200px", "200px", "200px", "200px", "200px", "200px");
Expand Down

0 comments on commit 18fc9f6

Please sign in to comment.