mirror of
https://github.com/servo/servo.git
synced 2025-09-27 07:10:19 +01:00
servoshell: Scale WebDriver mouse button coordinates by HiDPI scale factor (#39472)
Mouse button events are sent in CSSPixel coordinates, but these need to so they need to converted into device coordinates when creating an input event for them. This isn't an issue for automated test because they always use a scale factor of 1. This is a problem when running interactively and not in headless mode. Testing: This isn't really testable in an automated way, but is very obviously causes tests to pass when run with WebDriver and without headless mode. Fixes: Part of #38087. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c15495b3e7
commit
e4f3705494
1 changed files with 1 additions and 1 deletions
|
@ -522,7 +522,7 @@ impl App {
|
|||
InputEvent::MouseButton(MouseButtonEvent::new(
|
||||
mouse_event_type,
|
||||
mouse_button,
|
||||
Point2D::new(x, y),
|
||||
Point2D::new(x, y) * webview.hidpi_scale_factor(),
|
||||
))
|
||||
.with_webdriver_message_id(webdriver_message_id),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue