[css-grid] Fix percentage track sizing functions in size containment
When finding the intrinsic sizes of a grid container, track sizing functions that contain percentages would be indefinite, and thus should be treated as 'auto'. This is done in GridTrackSizingAlgorithm::CalculateGridTrackSize, but there was an early return if the grid container had size containment. Then, instead of being treated as 'auto', the track sizing function used to just resolve the percentage against 0. Additionally, a track sizing function of '1fr' is supposed to be treated as 'minmax(auto, 1fr)', since only max track sizing functions can be flexible. This fixup was also skipped, though this didn't affect the final result. This patch fixes these problems by removing the early return and adding some asserts. BUG=1069310 TEST=external/wpt/css/css-contain/contain-size-grid-003.html TEST=external/wpt/css/css-contain/contain-size-grid-004.html Change-Id: I1b8d8645a3fdf6c697c503184b35cc8cd12925a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144019 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by:Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#759431}
Showing
Please register or sign in to comment