Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ca658205d1c75d1f3b661ad59907374074252465
      
https://github.com/WebKit/WebKit/commit/ca658205d1c75d1f3b661ad59907374074252465
  Author: Alejandro G. Castro <[email protected]>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp

  Log Message:
  -----------
  [WPE] WebDriver input is broken on WPEPlatform views with a scale factor
https://bugs.webkit.org/show_bug.cgi?id=323603

Reviewed by Carlos Garcia Campos.

deviceScaleLocationInView() converts the location WebDriver asks for into
device pixels before it is handed to the platform. That is what wpe
expects, but a WPEPlatform view and the events delivered to it use logical
coordinates: WPEViewWayland passes the surface local coordinates straight
through, and a view's size relates to its buffer as
wpe_view_get_width(view) * scale == wpe_buffer_get_width(buffer).

So on a WPEPlatform view every simulated pointer, wheel and touch location
is multiplied by the scale factor once too often. On a display with a scale
of 1 nothing changes, which is why this went unnoticed, but testing in
Android devices that do not use 1 we get problems. The command reports
success and the page never sees the click, because it landed outside the
element.

Keep the conversion for wpe, whose events really are in device pixels, at
the two call sites that dispatch to it, and pass the location through
unchanged everywhere else. deviceScaleLocationInView() has no callers left
and goes away with it, so a port built without wpe compiles none of this.

* Source/WebKit/UIProcess/Automation/libwpe/WebAutomationSessionWPE.cpp:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):
(WebKit::WebAutomationSession::platformSimulateWheelInteraction):
(WebKit::WebAutomationSession::platformSimulateTouchInteraction):
(WebKit::deviceScaleLocationInView): Deleted.

Canonical link: https://commits.webkit.org/320864@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to