Closed Bug 1762256 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33427 - Avoid slot assignment recalc in counter update from detach

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rune Lillesveen <futhark@chromium.org> wrote:

Avoid slot assignment recalc in counter update from detach

DetachLayoutTree may end up moving layout objects due to e.g. making
sure the anonymous wrapper structure stays sound. That means
LayoutCounter::LayoutObjectSubtreeAttached() can be called when a
counter layout object is moved, a method which does a flat tree
traversal up its ancestors to find a style containment ancestor. Doing
this through the FlatTreeTraversal may end up updating slot assignments
on-demand. However, slot re-assignment is not allowed from
DetachLayoutTree as the re-assignment itself may end up doing a
DetachLayoutTree.

Avoid the slot re-assignment by doing a flat ancestor traversal without
updating slot assignments. We already do this for marking ancestors
child-dirty for style. If the slot assignments are dirty, the next
lifecycle update will update the counters as a result if necessary.

Bug: 1310295
Change-Id: I4573b3146fd91efce987108f95f2358af9e759c1

Reviewed-on: https://chromium-review.googlesource.com/3560463
WPT-Export-Revision: 71eb77a0c48ad94f57d07f22b27f5e975a634bdb

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/477d0d164ce9
[wpt PR 33427] - Avoid slot assignment recalc in counter update from detach, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.