mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Fire slot change events when the slot content changes (#35137)
* Add the onslotchange attribute to ShadowRoot Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec comments to MutationObserver::queue_mutation_observer_microtask Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add DomRefCell::take Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Add spec comments to notify_mutation_observers Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fire slotchange events when a slot changes Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * ./mach fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix check for when to dispatch slot events Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Potentially fire slot change events in Node::remove Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * ./mach fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Bump stylo Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move "signal a slot change" into ScriptThread impl Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
cd93841ba1
commit
859cc6ab9b
17 changed files with 152 additions and 119 deletions
3
tests/wpt/meta/dom/idlharness.window.js.ini
vendored
3
tests/wpt/meta/dom/idlharness.window.js.ini
vendored
|
@ -62,9 +62,6 @@
|
|||
[AbortController interface: new AbortController() must inherit property "signal" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[ShadowRoot interface: attribute onslotchange]
|
||||
expected: FAIL
|
||||
|
||||
[AbortController interface: new AbortController() must inherit property "abort()" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,28 +1,7 @@
|
|||
[imperative-slot-api-slotchange.html]
|
||||
expected: TIMEOUT
|
||||
[slotchange event must not fire synchronously.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event should not fire when same node is assigned.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event when slot's assigned nodes changes.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event on previous slot and new slot when node is reassigned.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event on node assignment and when assigned node is removed.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event when order of assigned nodes changes.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event when assigned node is removed.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event when removing a slot from Shadows Root that changes its assigned nodes.]
|
||||
expected: NOTRUN
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fire slotchange event when assign node to nested slot, ensure event bubbles ups.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
[Moving a slot's tree order position within a shadow host has no impact on its assigned slottables.]
|
||||
expected: FAIL
|
||||
|
||||
[Appending slottable to different host, it loses slot assignment. It can be re-assigned within a new host.]
|
||||
expected: FAIL
|
||||
|
||||
[Nodes can be assigned even if slots or nodes aren't in the same tree.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -35,18 +35,6 @@
|
|||
[slotchange event must not fire on a slot element inside a closed shadow root not in a document when another slot's assigned nodes change]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange event must fire on a slot element when a shadow host has a slottable and the slot was inserted and must not fire when the shadow host was mutated after the slot was removed inside an open shadow root in a document]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange event must fire on a slot element when a shadow host has a slottable and the slot was inserted and must not fire when the shadow host was mutated after the slot was removed inside a closed shadow root in a document]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange event must fire on a slot element when a shadow host has a slottable and the slot was inserted and must not fire when the shadow host was mutated after the slot was removed inside an open shadow root not in a document]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange event must fire on a slot element when a shadow host has a slottable and the slot was inserted and must not fire when the shadow host was mutated after the slot was removed inside a closed shadow root not in a document]
|
||||
expected: FAIL
|
||||
|
||||
[slotchange event must fire on a slot element inside an open shadow root in a document even if the slot was removed immediately after the assigned nodes were mutated]
|
||||
expected: FAIL
|
||||
|
||||
|
|
39
tests/wpt/meta/shadow-dom/slotchange.html.ini
vendored
39
tests/wpt/meta/shadow-dom/slotchange.html.ini
vendored
|
@ -3,47 +3,8 @@
|
|||
[slotchange event: Append a child to a host.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Remove a child from a host.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Remove a child before adding an event listener.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Change slot= attribute to make it un-assigned.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Change slot's name= attribute so that none is assigned.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Change slot= attribute to make it assigned.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Change slot's name= attribute so that a node is assigned to the slot.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Change fallback content - assignedNodes still empty.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Remove a fallback content - assignedNodes still empty.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Add a fallback content to nested slots - assignedNodes still empty.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Remove a fallback content from nested slots - assignedNodes still empty.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Insert a slot before an existing slot.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Remove a preceding slot.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: A slot is assigned to another slot.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Slotchange should be fired if assigned nodes are changed.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[slotchange event: Child content is added to nested slots.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[slots-fallback-in-document.html]
|
||||
[Children of a slot in a document tree should not be counted in flattened assigned nodes.]
|
||||
expected: FAIL
|
||||
|
||||
[Slot fallback content in shadow tree should be counted in flattened assigned nodes.]
|
||||
expected: FAIL
|
|
@ -14,8 +14,5 @@
|
|||
[Slots fallback: Mutation. Assign a node to a slot so that fallback contens are no longer used.]
|
||||
expected: FAIL
|
||||
|
||||
[Slots fallback: Mutation. Remove an assigned node from a slot so that fallback contens will be used.]
|
||||
expected: FAIL
|
||||
|
||||
[Slots fallback: Mutation. Remove a slot which is a fallback content of another slot.]
|
||||
expected: FAIL
|
||||
|
|
3
tests/wpt/meta/shadow-dom/slots.html.ini
vendored
3
tests/wpt/meta/shadow-dom/slots.html.ini
vendored
|
@ -26,9 +26,6 @@
|
|||
[Slots: Mutation: Add a slot: before.]
|
||||
expected: FAIL
|
||||
|
||||
[Slots: Mutation: Remove a slot.]
|
||||
expected: FAIL
|
||||
|
||||
[Slots: Mutation: Change slot name= attribute.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue