mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: Move Window-only gamepad functionality out of GlobalScope (#36805)
The only code that calls these methods is in the script thread, and the code is simpler when we can assume a Window global. Pulling this thread led to cleaning up a lot of constructors for Window-only WebXR code, too. Testing: Existing WPT coverage. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
80d3e138a8
commit
b8971e528f
13 changed files with 199 additions and 236 deletions
|
@ -1126,7 +1126,7 @@ impl ScriptThread {
|
|||
document.dispatch_ime_event(ime_event, can_gc);
|
||||
},
|
||||
InputEvent::Gamepad(gamepad_event) => {
|
||||
window.as_global_scope().handle_gamepad_event(gamepad_event);
|
||||
window.handle_gamepad_event(gamepad_event);
|
||||
},
|
||||
InputEvent::EditingAction(editing_action_event) => {
|
||||
document.handle_editing_action(editing_action_event, can_gc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue