script: add force option for assign-slottables for a tree#42250
script: add force option for assign-slottables for a tree#42250TimvdLippe merged 4 commits intoservo:mainfrom
Conversation
Signed-off-by: rayguo17 <[email protected]>
TimvdLippe
left a comment
There was a problem hiding this comment.
Since WPT doesn't have any tests for this apparently, please add a WPT test with #35188 (comment)
components/script/dom/node.rs
Outdated
|
|
||
| /// <https://dom.spec.whatwg.org/#assign-slotables-for-a-tree> | ||
| pub(crate) fn assign_slottables_for_a_tree(&self) { | ||
| pub(crate) fn assign_slottables_for_a_tree(&self, force: bool) { |
There was a problem hiding this comment.
Nit: use enum with two booleans to be more descriptive. Suggestion:
enum ForceSlottableNodeRecalcilation {
Force,
Skip,
}|
🔨 Triggering try run (#21507046176) for Linux (WPT) |
|
Test results for linux-wpt from try job (#21507046176): Flaky unexpected result (35)
Stable unexpected results that are known to be intermittent (29)
|
|
✨ Try run (#21507046176) succeeded. |
…test testing this behaviour Signed-off-by: rayguo17 <[email protected]>
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#57471) with upstreamable changes. |
|
🔨 Triggering try run (#21565836098) for Linux (WPT) |
|
Test results for linux-wpt from try job (#21565836098): Flaky unexpected result (33)
Stable unexpected results that are known to be intermittent (27)
Stable unexpected results (1)
|
|
|
Signed-off-by: rayguo17 <[email protected]>
|
🔨 Triggering try run (#21572915976) for Linux (WPT) |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#57471). |
|
Test results for linux-wpt from try job (#21572915976): Flaky unexpected result (35)
Stable unexpected results that are known to be intermittent (26)
|
|
✨ Try run (#21572915976) succeeded. |
Signed-off-by: rayguo17 <[email protected]>
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#57471). |
|
This PR should be ready to merge. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#57471) title and body. |
In the case of node removal, if the subtree of the removed node contains
<slot>element, force traverse down to each<slot>element is needed to reset the assignment of the slottables that currently being assigned to the<slot>element. This changes add this force option toassign_slottables_for_a_tree, and only set true to node removal.Testing: Should be covered by current WPT test, try run
Fixes #35188
Fixes #42182
cc @TimvdLippe @simonwuelker @xiaochengh