Closed Bug 1671610 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 26136 - [grid] Relayout grid items when definiteness changes.

Categories

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

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Ian Kilpatrick <ikilpatrick@chromium.org>' wrote:

[grid] Relayout grid items when definiteness changes.

Previously LayoutGrid performed a simple logical-height change check
to determine if a grid-item needed relayout.

This wasn't correct as when setting an override logical-height the
definiteness can change causing %-height children to resolve
differently.

This became troublesome after we moved relative-positioning into NG
as %-block-start, %-block-end offsets weren't resolving correctly.

This however also fixes other issues such as test:
percentage-size-subitems-002.html

Where LayoutGrid wasn't performing a relayout causing grandchild to size
incorrectly.

This may have a performance hit for any legacy children being having
layout performed by a LayoutGrid, however should be fine for an NG child
as we have much more precise cache logic for this case.

The following tests have been marked as failing:
virtual/layout-ng-grid/external/wpt/css/css-grid/relative-grandchild.html
virtual/layout-ng-grid/external/wpt/css/css-grid/grid-items/percentage-size-subitems-002.html
as GridNG doesn't correctly set up the constraint spaces yet.

Bug: 1138504, 1018439
Change-Id: Iac2484f1b175f152e491f421449fb7b555c9e125
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2474917
Commit-Queue: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: Christian Biesinger \<cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817631}

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

CI Results

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

Total 2 tests

Status Summary

Firefox

PASS: 2

Chrome

FAIL: 2

Safari

PASS: 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17c522d7b82d [wpt PR 26136] - [grid] Relayout grid items when definiteness changes., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.