[webdriver] Add synchronization for wheel action (#37260)

Implement action synchronization for wheel event. Previously only done
for pointer here https://github.com/servo/servo/pull/36932.

Testing:
`tests/wpt/meta/webdriver/tests/classic/perform_actions/wheel.py`

---------

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
Kenzie Raditya Tirtarahardja 2025-06-11 17:03:08 +08:00 committed by GitHub
parent 5114e24db1
commit 15eadb56a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 89 additions and 34 deletions

View file

@ -4899,10 +4899,20 @@ where
webview_id, x, y, msg_id,
));
},
WebDriverCommandMsg::WheelScrollAction(webview, x, y, delta_x, delta_y) => {
WebDriverCommandMsg::WheelScrollAction(
webview_id,
x,
y,
delta_x,
delta_y,
msg_id,
response_sender,
) => {
self.webdriver.input_command_response_sender = Some(response_sender);
self.compositor_proxy
.send(CompositorMsg::WebDriverWheelScrollEvent(
webview, x, y, delta_x, delta_y,
webview_id, x, y, delta_x, delta_y, msg_id,
));
},
WebDriverCommandMsg::TakeScreenshot(webview_id, rect, response_sender) => {