Closed Bug 1572159 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18316 - [LayoutNG] Fix invalidation issue with grids.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

[LayoutNG] Fix invalidation issue with grids.

with: https://chromium-review.googlesource.com/c/chromium/src/+/1554113

We introduced a new flag for SelfNeedsLayoutForAvailableSpace. For any
alignment change this was set to true for grid-items.

SelfNeedsLayout reports true if this flag is set, or if the normal
SelfNeedsLayoutForStyle is true.

This caused an issue where we weren't performing layout on the whole tree
however.

If a child of the grid-item (whose alignment changed) was marked for
needing style-layout, it would try and mark its container chain for
layout, hit the grid item, and abort, as it already "needed" layout.

Within NG we'd come across the grid-item, hit the cache, or perform
simplified layout, never clearing layout, having a bad ptr, etc.

This is a conservative fix so that this can be merged.

Bug: 991446
Change-Id: I75edebc864eb470ebfad757966ddc0e0248de153
Reviewed-on: https://chromium-review.googlesource.com/1741439
WPT-Export-Revision: 96fca1607df8d79448b9961073cdf0db8f58a695

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 1 tests and 1 subtests
OK     : 1
PASS   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a167060670c3
[wpt PR 18316] - [LayoutNG] Fix invalidation issue with grids., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.