Closed Bug 2084495 Opened 1 month ago Closed 18 days ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Claudio Saavedra <csaavedra@igalia.com> wrote:

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

WebKit export from bug: Grid with a subgrid whose item has an aspect-<!---->ratio and a percentage height crashes in Grid:<!---->:<!---->gridItemArea(<!---->)<!---->

<pre>
Grid with a subgrid whose item has an aspect-ratio and a percentage height crashes in Grid::gridItemArea()

RenderGrid::computeAspectRatioDependentAndBaselineItems() collects the items
whose grid area has to be refreshed once the rows are sized. It reuses the
baseline-item traversal, which descends into subgrids, so an item of a subgrid
ends up in the list and updateGridAreaIncludingAlignment() then looks it up in
this grid's placement table, which only holds direct children. The lookup
asserts, and in release builds returns an indefinite span whose end line
indexes the positions vector out of bounds.

Only put direct children in the list: a subgrid places its own items and
refreshes their grid area when it lays itself out. An item of a subgrid that
inherits this grid's rows still makes the column sizes depend on the row sizes,
so give it the second-pass min-content contribution a direct child gets, and
let gridAreaBreadthForGridItemIncludingAlignmentOffsets() translate the span
through subgrids so that pass can read the item's row size.

Ungardens six grid-lanes subgrid tests, which now pass, and adds a WPT for a
plain grid, which crashed the same way, covering a fixed row, a percentage
height and a row whose size is only known after row sizing.

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

Component: web-platform-tests → Layout: Grid
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
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 141 tests and 8 subtests

Status Summary

Firefox

OK : 1[GitHub] 26[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: 13[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 203[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 299[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: 3[GitHub] 66[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 72[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: 2
FAIL: 1

Safari

OK : 1
PASS: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.