aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gamepadhapticactuator.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gamepadhapticactuator.rs')
-rw-r--r--components/script/dom/gamepadhapticactuator.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/components/script/dom/gamepadhapticactuator.rs b/components/script/dom/gamepadhapticactuator.rs
index d152f633c02..cd93f3421bc 100644
--- a/components/script/dom/gamepadhapticactuator.rs
+++ b/components/script/dom/gamepadhapticactuator.rs
@@ -235,6 +235,7 @@ impl GamepadHapticActuatorMethods<crate::DomTypeHolder> for GamepadHapticActuato
weak_magnitude: *params.weakMagnitude,
};
let event = EmbedderMsg::PlayGamepadHapticEffect(
+ document.webview_id(),
self.gamepad_index as usize,
embedder_traits::GamepadHapticEffectType::DualRumble(params),
effect_complete_sender,
@@ -287,8 +288,11 @@ impl GamepadHapticActuatorMethods<crate::DomTypeHolder> for GamepadHapticActuato
}),
);
- let event =
- EmbedderMsg::StopGamepadHapticEffect(self.gamepad_index as usize, effect_stop_sender);
+ let event = EmbedderMsg::StopGamepadHapticEffect(
+ document.webview_id(),
+ self.gamepad_index as usize,
+ effect_stop_sender,
+ );
self.global().as_window().send_to_embedder(event);
self.playing_effect_promise.borrow().clone().unwrap()
@@ -356,7 +360,12 @@ impl GamepadHapticActuator {
let (send, _rcv) = ipc::channel().expect("ipc channel failure");
- let event = EmbedderMsg::StopGamepadHapticEffect(self.gamepad_index as usize, send);
+ let document = self.global().as_window().Document();
+ let event = EmbedderMsg::StopGamepadHapticEffect(
+ document.webview_id(),
+ self.gamepad_index as usize,
+ send,
+ );
self.global().as_window().send_to_embedder(event);
}
}