diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-01-07 10:56:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-07 09:56:02 +0000 |
commit | e42b4b793d52e756e79c8a408b3f7e99219493f5 (patch) | |
tree | 1346ec6841f8e37b00018c836a29fb227f026d41 /components/script/dom/textcontrol.rs | |
parent | 17e2ca3f013e2ff8e7d7bca08d93c6c723a2b71d (diff) | |
download | servo-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.rs | 2 |
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( |