Closed Bug 1630331 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 22975 - [css-grid] Fix percentage track sizing functions in size containment

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22975 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22975
Details from upstream follow.

Oriol Brufau <obrufau@igalia.com> wrote:

[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/2144019
WPT-Export-Revision: 3e3bc813221c191f8255249ad6e940e56cb1d50f

Component: web-platform-tests → Layout
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3e365ef52d58
[wpt PR 22975] - [css-grid] Fix percentage track sizing functions in size containment, a=testonly
https://hg.mozilla.org/integration/autoland/rev/d1189c17697d
[wpt PR 22975] - Update wpt metadata, a=testonly
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.