Closed Bug 2077003 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63136 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=323369

Categories

(Core :: Layout: Grid, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Sammy Gill <sammy.gill@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=323369

WebKit export from bug: [GFC] A grid item's automatic minimum size should be clamped to a fixed max track sizing function

<pre>
[GFC] A grid item's automatic minimum size is not clamped to a fixed max track sizing function.

<a href="https://drafts.csswg.org/css-grid-1/#min-size-auto">https://drafts.csswg.org/css-grid-1/#min-size-auto</a> says that if a grid item spans only grid tracks
that have a fixed max track sizing function, then its specified size suggestion and content size
suggestion are further clamped to less than or equal to the stretch fit into the grid area's
maximum size in that dimension, as represented by the sum of those grid tracks' max track sizing
functions plus any intervening fixed gutters.

GFC never applied that clause. automaticMinimumInlineSize() and automaticMinimumBlockSize() only
clamped the size suggestion by the item's own maximum size, so an item whose content is taller or
wider than its grid area kept a content-based minimum size larger than the maximum the author gave
the tracks it spans.

The automatic minimum size is queried in two places, and the two know the grid area differently.

While track sizing is in progress the grid area does not exist yet, so gridAreaMaximumSize()
approximates it by the sum of the spanned tracks' max track sizing functions plus the gutters
between them. This is the size described in the blub from the portion of
the spec mentioned earlier.

Once the tracks are sized the grid area is resolved, so inlineMinimumSize() and blockMinimumSize()
clamp against the grid area itself. Without this the row is capped correctly but the item inside it
is still laid out at its content size and overflows its own grid area.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=323369">https://bugs.webkit.org/show_bug.cgi?id=323369</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/320750@main">https://commits.webkit.org/320750@main</a>
</pre>

Component: web-platform-tests → Layout: Grid
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 67 tests and 6 subtests

Status Summary

Firefox

OK : 1[GitHub] 33[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 4[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 13[GitHub] 527[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 556[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 19[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 20[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 13

Safari

OK : 1
PASS: 13

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-grid/layout-algorithm/flex-tracks-with-fractional-size.html [wpt.fyi]: FAIL
  • /css/css-grid/layout-algorithm/automatic-minimum-size-clamped-to-fixed-max-track-sizing-function.html [wpt.fyi]
    • An item taller than its track does not grow the track past its fixed maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item taller than its track does not grow the track past its fixed maximum when the grid container height is definite: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item shorter than its track's fixed maximum still lets the track grow to that maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item taller than its track grows a track whose maximum is intrinsic: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • A specified minimum size is not clamped to the track's fixed maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • A scroll container taller than its track does not grow the track past its fixed maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item spanning several tracks does not grow any of them past their fixed maximums: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item with margins does not grow its track past its fixed maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item taller than its track does not grow the track past a definite percentage maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
    • An item taller than its track does not grow the track past a definite calc() maximum: FAIL [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], PASS [GitHub] (Chrome: PASS, Safari: PASS)
  • /css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002.html [wpt.fyi]
    • 'grid' with: grid-template-columns: 1fr 1fr 1fr; and grid-template-rows: 1fr 1fr 1fr;: FAIL
  • /css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-003.html [wpt.fyi]
    • min-content min item 'grid' with: grid-template-columns: 0.5fr auto; and grid-template-rows: 0.5fr auto;: FAIL
    • 50px min item 'grid' with: grid-template-columns: 0.5fr auto; and grid-template-rows: 0.5fr auto;: FAIL
  • /css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-lr.html [wpt.fyi]
    • .grid 2: FAIL
    • .grid 3: FAIL
  • /css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim-vertical-rl.html [wpt.fyi]
    • .grid 2: FAIL
    • .grid 3: FAIL
  • /css/css-grid/layout-algorithm/grid-minimum-contribution-baseline-shim.html [wpt.fyi]
    • .grid 2: FAIL
    • .grid 3: FAIL
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.