Closed Bug 2036297 Opened 16 days ago Closed 9 days ago

[wpt-sync] Sync PR 59556 - [Masonry] Add cross-group baseline shim to track sizing algorithm

Categories

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

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Yanling Wang <yanlingwang@microsoft.com> wrote:

[Masonry] Add cross-group baseline shim to track sizing algorithm

This CL implements cross-group baseline shim computation in the
grid-lanes track sizing algorithm. Previously, baseline shims were only
computed within each item group. Items from different groups (e.g.,
span-1 and span-2 items sharing a track) did not align their baselines
correctly during track sizing.

The implementation:

  1. Stores the group's shared baseline and alignment properties on each
    virtual item during BuildVirtualGridLanesItems, so copies inherit
    them.
  2. Builds per-track shared baselines in InitializeTrackSizes by
    scanning all virtual item copies after set indices are assigned.
  3. Computes the cross-group baseline shim in
    ContributionSizeForVirtualItem by looking up the per-track shared
    baseline and adding the shim to the contribution size.

Updated several grid-lanes-baseline-alignment-affects-intrinsic
-size-*.html tests to reflect the new baseline shim behavior per
the resolution of [1].

[1] https://github.com/w3c/csswg-drafts/issues/13530

Bug: 343257585, 498657234
Change-Id: I5dba19e8b543bb62009e07934dcf1069940ff988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7790879
Reviewed-by: Alison Maher \<almaher@microsoft.com>
Reviewed-by: Celeste Pan \<celestepan@microsoft.com>
Commit-Queue: Yanling Wang \<yanlingwang@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1622803}

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 9 tests and 1 subtests

Status Summary

Firefox

OK : 2
FAIL: 2[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 4[GitHub] 9[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 : 2
FAIL: 4

Safari

OK : 2
PASS: 1
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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