Open Bug 1848441 Opened 2 years ago Updated 11 months ago

Firefox fails WPT css/css-grid/alignment/grid-align-baseline-grid-001.html (and -002, -003)

Categories

(Core :: Layout: Grid, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 2 open bugs)

Details

We fail subtests in these interop-2023-grid WPT tests:
https://wpt.fyi/results/css/css-grid/alignment/grid-align-baseline-grid-001.html
https://wpt.fyi/results/css/css-grid/alignment/grid-align-baseline-grid-002.html
https://wpt.fyi/results/css/css-grid/alignment/grid-align-baseline-grid-003.html

wpt.live links:
http://wpt.live/css/css-grid/alignment/grid-align-baseline-grid-001.html
http://wpt.live/css/css-grid/alignment/grid-align-baseline-grid-002.html
http://wpt.live/css/css-grid/alignment/grid-align-baseline-grid-003.html

These tests were added upstream in this commit with a bit more detail about the thinking behind them:
https://github.com/web-platform-tests/wpt/commit/cfc42c544acd50904167b331fa2fd11e674daced

From looking at the -001 test at least, it looks like we're failing in the case where we should end up extracting the opposite baseline (because that's all we've got). E.g. our first failure in -001 is for the 3rd box, where we've got a small cyan div that's being first baseline aligned to a grid; and we currently align it with the first grid item in that grid, even though that item itself is not a baseline-aligned item (it has align-self:start). Really, the text is expecting that we notice that there are other items in that first row which are doing baseline alignment (which happens to be last baseline), and we're supposed to use that baseline position extracted from the first row as the extracted first baseline for the grid.

Summary: Firefox fails WPT css/css-grid/alignment/grid-align-baseline-flex-001.html (and -002, -003, -004) → Firefox fails WPT css/css-grid/alignment/grid-align-baseline-grid-001.html (and -002, -003)
Severity: -- → S3

According to this: https://drafts.csswg.org/css-grid-1/#grid-baselines

If any of the grid items intersecting this row participate in baseline alignment in that row, the grid container’s baseline set is generated from the shared alignment baseline of those grid items.

Right now we skip this step and just take the first/last item in grid-order to calculate the baseline of the grid.

You need to log in before you can comment on or make changes to this bug.