Remove accidentally re-added logic to WebDriverSession::input_cancel_list (#37081)

Re-remove deleted logic from `WebDriverSession::input_cancel_list` logic
in #37010 which was re-adedd during merge resolution in #36932.
Otherwise, duplicate items would be registered in Release Actions.

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-05-23 15:50:42 +08:00 committed by GitHub
parent 23ce7b31ac
commit 6d04ef2d6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -328,15 +328,6 @@ impl Handler {
_ => unreachable!(),
};
session.input_cancel_list.borrow_mut().push(ActionSequence {
id: source_id.into(),
actions: ActionsType::Key {
actions: vec![KeyActionItem::Key(KeyAction::Up(KeyUpAction {
value: action.value.clone(),
}))],
},
});
let keyboard_event = key_input_state.dispatch_keydown(raw_key);
// Step 12
@ -360,15 +351,6 @@ impl Handler {
_ => unreachable!(),
};
session.input_cancel_list.borrow_mut().push(ActionSequence {
id: source_id.into(),
actions: ActionsType::Key {
actions: vec![KeyActionItem::Key(KeyAction::Up(KeyUpAction {
value: action.value.clone(),
}))],
},
});
if let Some(keyboard_event) = key_input_state.dispatch_keyup(raw_key) {
// Step 12
let cmd_msg = WebDriverCommandMsg::KeyboardAction(
@ -396,25 +378,6 @@ impl Handler {
}
pointer_input_state.pressed.insert(action.button);
session.input_cancel_list.borrow_mut().push(ActionSequence {
id: source_id.into(),
actions: ActionsType::Pointer {
parameters: PointerActionParameters {
pointer_type: match pointer_input_state.subtype {
PointerType::Mouse => PointerType::Mouse,
PointerType::Pen => PointerType::Pen,
PointerType::Touch => PointerType::Touch,
},
},
actions: vec![PointerActionItem::Pointer(PointerAction::Up(
PointerUpAction {
button: action.button,
..Default::default()
},
))],
},
});
let msg_id = self.current_action_id.get().unwrap();
let cmd_msg = WebDriverCommandMsg::MouseButtonAction(
session.webview_id,
@ -445,25 +408,6 @@ impl Handler {
}
pointer_input_state.pressed.remove(&action.button);
session.input_cancel_list.borrow_mut().push(ActionSequence {
id: source_id.into(),
actions: ActionsType::Pointer {
parameters: PointerActionParameters {
pointer_type: match pointer_input_state.subtype {
PointerType::Mouse => PointerType::Mouse,
PointerType::Pen => PointerType::Pen,
PointerType::Touch => PointerType::Touch,
},
},
actions: vec![PointerActionItem::Pointer(PointerAction::Down(
PointerDownAction {
button: action.button,
..Default::default()
},
))],
},
});
let msg_id = self.current_action_id.get().unwrap();
let cmd_msg = WebDriverCommandMsg::MouseButtonAction(
session.webview_id,