-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Webdriver: Pointer Input Source with Subtype Touch is not Respected #39264
Copy link
Copy link
Closed
Labels
A-webdriverC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issue
Description
Pointer input source (#pointer-input-source) have several subtype, that is mouse, touch, and pen, each corresponding to the related pointing device. But in the current implementation, when we are dispatching an PointerAction from a pointer input source, we are disregarding this subtype and always dispatch a WebDriverCommandMsg::MouseButtonAction instead.
See components::webdriver_server::Handler::dispatch_pointerdown_action for example.
servo/components/webdriver_server/actions.rs
Lines 362 to 387 in 9e9bd80
| pub(crate) fn dispatch_pointerdown_action(&self, source_id: &str, action: &PointerDownAction) { | |
| let session = self.session().unwrap(); | |
| let mut input_state_table = session.input_state_table_mut(); | |
| let pointer_input_state = match input_state_table.get_mut(source_id).unwrap() { | |
| InputSourceState::Pointer(pointer_input_state) => pointer_input_state, | |
| _ => unreachable!(), | |
| }; | |
| if pointer_input_state.pressed.contains(&action.button) { | |
| return; | |
| } | |
| pointer_input_state.pressed.insert(action.button); | |
| self.increment_num_pending_actions(); | |
| let msg_id = self.current_action_id.get(); | |
| let cmd_msg = WebDriverCommandMsg::MouseButtonAction( | |
| self.verified_webview_id(), | |
| MouseButtonAction::Down, | |
| action.button.into(), | |
| pointer_input_state.x as f32, | |
| pointer_input_state.y as f32, | |
| msg_id, | |
| ); | |
| let _ = self.send_message_to_embedder(cmd_msg); | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-webdriverC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issue