aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/textcontrol.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-01-07 10:56:02 +0100
committerGitHub <noreply@github.com>2025-01-07 09:56:02 +0000
commite42b4b793d52e756e79c8a408b3f7e99219493f5 (patch)
tree1346ec6841f8e37b00018c836a29fb227f026d41 /components/script/dom/textcontrol.rs
parent17e2ca3f013e2ff8e7d7bca08d93c6c723a2b71d (diff)
downloadservo-e42b4b793d52e756e79c8a408b3f7e99219493f5.tar.gz
servo-e42b4b793d52e756e79c8a408b3f7e99219493f5.zip
script: Expose `NodeTraits::owner_global` / `Window::as_global_scope` (#34843)
Expose two new helpers and start using them as much as possible. - `NodeTraits::owner_global`: which gets the `GlobalScope` that currenty owns a `Node`. This may be different than `.global()` in the case that the `Node` was adopted by a different `Document`. - `Window::as_global_scope`: A helper to avoid having to cast so much when treating a `Window` like a `GlobalScope`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/textcontrol.rs')
-rw-r--r--components/script/dom/textcontrol.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/textcontrol.rs b/components/script/dom/textcontrol.rs
index 6fab849a17c..313832d1471 100644
--- a/components/script/dom/textcontrol.rs
+++ b/components/script/dom/textcontrol.rs
@@ -301,7 +301,7 @@ impl<'a, E: TextControlElement> TextControlSelection<'a, E> {
// Step 6
if textinput.selection_state() != original_selection_state {
self.element
- .owner_window()
+ .owner_global()
.task_manager()
.user_interaction_task_source()
.queue_event(