aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2025-01-30 14:57:04 +0100
committerGitHub <noreply@github.com>2025-01-30 13:57:04 +0000
commit64b40ea70065f949d1e281bd046c56d50312f2a7 (patch)
treed6e2b2910af4e25021aaf72e11fd44d181f6d1a9 /components/script/script_thread.rs
parent5e9de2cb61fbfd82b27343bf03439838458b9848 (diff)
downloadservo-64b40ea70065f949d1e281bd046c56d50312f2a7.tar.gz
servo-64b40ea70065f949d1e281bd046c56d50312f2a7.zip
Don't fire slotchange events when there's already a pending event for the same slot (#35222)
* Don't fire slotchange events if there is already a pending event for the same slot Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index e0c839588fb..ec2c36d1d25 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -529,6 +529,9 @@ impl ScriptThread {
.signal_slots
.take()
.into_iter()
+ .inspect(|slot| {
+ slot.remove_from_signal_slots();
+ })
.map(|slot| slot.as_rooted())
.collect()
})
@@ -3746,15 +3749,6 @@ impl ScriptThread {
)
}
}
-
- /// <https://dom.spec.whatwg.org/#signal-a-slot-change>
- pub(crate) fn signal_a_slot_change(slot: &HTMLSlotElement) {
- // Step 1. Append slot to slot’s relevant agent’s signal slots.
- ScriptThread::add_signal_slot(slot);
-
- // Step 2. Queue a mutation observer microtask.
- MutationObserver::queue_mutation_observer_microtask();
- }
}
impl Drop for ScriptThread {