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:
Simon Wülker 2025-01-27 15:13:22 +01:00 committed by GitHub
parent cd93841ba1
commit 859cc6ab9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 152 additions and 119 deletions

View file

@ -140,7 +140,7 @@ impl MicrotaskQueue {
ScriptThread::invoke_backup_element_queue(can_gc);
},
Microtask::NotifyMutationObservers => {
MutationObserver::notify_mutation_observers();
MutationObserver::notify_mutation_observers(can_gc);
},
Microtask::ReadableStreamTeeReadRequest(ref task) => {
task.microtask_chunk_steps(can_gc)