[wpt-sync] Sync PR 61656 - script: More carefully handle dirty root and descendant damage marking
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 61656 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/61656
Details from upstream follow.
Martin Robinson <mrobinson@igalia.com> wrote:
script: More carefully handle dirty root and descendant damage marking
Script passes a dirty root to layout along with setting the
HAS_DIRTY_DESCENDANTS flag on elements at or below that root indicating
that children need to be traversed. There was an undocumented invariant
that no nodes above that dirty root were marked with
HAS_DIRTY_DESCENDANTS, as the flag itself was used to determine
when the dirty root is raised to some common ancestor of the old dirty
root and a damaged node.There were some problems with the old implementation and this change
fixes them by hewing closer to Gecko (from which we took this design).
Notably:
- In the complex situation where we cannot trivially calculate the dirty
root, we now calculate it by walking up from the old dirty root and
finding the first element which already has the flag set.- When removing nodes from the flat tree, if they were the previous
dirty root, the dirty root is cleared.- Ensure that all marking traversals for HAS_DIRTY_DESCENDANTS flag
marking happen in the flat tree.- When slotting nodes into
<slot>elements, the style and layout data
of fallback content is cleared, and the dirty root is potentially reset.- Comments are added everywhere in this tricky algorithm explaining what
the heck is going on.Testing: This change adds a new WPT crash test.
Fixes: #<!-- nolink -->46024.
Fixes: #<!-- nolink -->46883.Reviewed in servo/servo#46906
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 1•3 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=794d423411282b6a2f76ba9620d8f2127f993de4
| Assignee | ||
Comment 2•3 months ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 25 tests
Status Summary
Firefox
PASS: 1[GitHub] 25[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-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
PASS: 1
Safari
PASS: 1
Links
Comment 4•3 months ago
|
||
| bugherder | ||
Description
•