Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebDriver: [macOS] Add support for Wheel input source and actions
https://bugs.webkit.org/show_bug.cgi?id=244092 rdar://45649400 Reviewed by Devin Rousso. Enable WEBDRIVER_WHEEL_INTERACTIONS on macOS and properly create and dispatch scroll events. Because NSEvent does not provide a direct mechanism for creating synthetic scroll events (like it does for Mouse and Keyboard events) we create a CGEvent to represent the scroll, create an NSEvent from the CGEvent, and then force the event to be relative to and associated with the window, which makes the events consistent with our other window-relative events and prevents the event from being thrown out by the window as irrelevant. This passes the WPT tests in /webdriver/tests/perform_actions/wheel.py when paired with a matching safaridriver change to support parsing the events. * Source/WTF/wtf/PlatformEnableCocoa.h: * Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm: (WebKit::viewportLocationToWindowLocation): (WebKit::WebAutomationSession::platformSimulateMouseInteraction): (WebKit::WebAutomationSession::platformSimulateWheelInteraction): * Source/cmake/OptionsMac.cmake: Canonical link: https://commits.webkit.org/253578@main
- Loading branch information
Showing 3 changed files with 43 additions and 5 deletions.