Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r221931 - [css-grid] Stretching auto tracks should be done as p…
…art of the track sizing algorithm https://bugs.webkit.org/show_bug.cgi?id=176783 Reviewed by Sergio Villar Senin. LayoutTests/imported/w3c: Import changes on the test related to the new behavior. * web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html: Source/WebCore: 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 RenderGrid::applyStretchAlignmentToTracksIfNeeded() to GridTrackSizingAlgorithm::stretchAutoTracks(). And then modifies the grid track sizing algorithm to execute the new step. This patch uses the WPT test updated to check the new behavior. * rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes): Initialize the list of auto tracks. (WebCore::GridTrackSizingAlgorithm::stretchFlexibleTracks): Add early return if there are not flexible tracks. (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks): Code moved from RenderGrid::applyStretchAlignmentToTracksIfNeeded(). (WebCore::GridTrackSizingAlgorithm::setup): Reset list of auto tracks. (WebCore::GridTrackSizingAlgorithm::run): Add new step stretchAutoTracks(). (WebCore::GridTrackSizingAlgorithm::reset): Reset auto tracks. * rendering/GridTrackSizingAlgorithm.h: Add m_autoSizedTracksIndex. * rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutBlock): Avoid applying stretch here. (WebCore::RenderGrid::contentAlignmentNormalBehaviorGrid): Make public. (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded): Moved to GridTrackSizingAlgorithm::stretchAutoTracks(). * rendering/RenderGrid.h:
- Loading branch information
1 parent
2dcc37b
commit 3a9d8ac
Showing
7 changed files
with
94 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters