Closed Bug 2076987 Opened 1 month ago Closed 1 month ago

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

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 63128 into mozilla-central (this bug is closed when the sync is complete).

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: Combining aspect-ratio with grid causes stale dimensions

<pre>
[Grid] Grid item with an aspect ratio keeps its stale inline contribution when the grid container shrinks

<div id=grid style="display: grid; grid-template-columns: 1fr 1fr; width: 200px">
<div style="aspect-ratio: 1.5"></div>
<div></div>
</div>
<script>grid.style.width = "150px"</script>

After the shrink both 1fr columns should be 75px wide. Instead the first one
stayed 100px and the second got the leftover 50px.

Grid runs a second column sizing pass for items whose inline size depends on
their block size, and it measures them with the row size installed as an
overriding block size. The aspect ratio then transfers that row size into the
item's inline size, and the 100px result gets cached as the item's min-content
contribution. shouldInvalidateContentWidths(), which tells the next layout to
measure again, only covered flex items, so the 100px stayed cached and floored
the flexible track. Growing the container hid this because the larger fr share
was already above the stale value.

Add grid items next to the flex item case, which <a href="https://commits.webkit.org/241542@main">241542@main</a> added for the same
reason.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=322714">https://bugs.webkit.org/show_bug.cgi?id=322714</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/320117@main">https://commits.webkit.org/320117@main</a>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
</pre>

Component: web-platform-tests → Layout: Grid
Product: Testing → Core

CI Results

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

Total 209 tests and 60 subtests

Status Summary

Firefox

OK : 38
PASS: 1[GitHub] 904[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1074[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] 1075[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

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.