Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pointerevent_movementxy.html?mouse WPT is failing on safaridriver after 265730@main #17089

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

aprotyas
Copy link
Member

@aprotyas aprotyas commented Aug 25, 2023

7d047e3

pointerevent_movementxy.html?mouse WPT is failing on safaridriver after 265730@main
https://bugs.webkit.org/show_bug.cgi?id=260633
rdar://114350545

Reviewed by Aditya Keerthi.

The pointerevent_movementxy.html?mouse WPT was made to pass on WKTR in
265730@main, but this test continued to fail when run through the WPT +
safaridriver tooling.

It turns out that we're just never propagating the mousemove event
deltas before sending NSEvent instances in
WebAutomationSession::platformSimulateMouseInteraction. To fix this, we
make two changes:

1. Keep track of the previous mouse click by calling into
WebAutomationSession::updateClickCount().
2. Follow the precedent set by EventSenderProxy in WKTR and assign the
deltaX/Y fields of a CGEvent, finally initializing an NSEvent from it.

No new tests because we do not expect WebKit behavior to change.

* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:

Provide default values to the maxTime and maxDistance arguments in
WebAutomationSession::updateClickCount(). This matches the time and
distance heuristics used in EventSenderProxy::updateClickCountForButton.

* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

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

e2ea2eb

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 ❌ πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@aprotyas aprotyas requested a review from cdumez as a code owner August 25, 2023 23:13
@aprotyas aprotyas self-assigned this Aug 25, 2023
@aprotyas aprotyas added the UI Events For bugs related to user interactions like keyboard, mouse, and touch events. label Aug 25, 2023
@aprotyas aprotyas requested a review from pxlcoder August 25, 2023 23:44
@aprotyas
Copy link
Member Author

Thanks for the review! I've confirmed locally that we don't break any existing pointerevent WPTs. Plus, we are now also passing the pointerlock/movementX_Y_basic.html.

@aprotyas aprotyas added the merge-queue Applied to send a pull request to merge-queue label Aug 28, 2023
…er 265730@main

https://bugs.webkit.org/show_bug.cgi?id=260633
rdar://114350545

Reviewed by Aditya Keerthi.

The pointerevent_movementxy.html?mouse WPT was made to pass on WKTR in
265730@main, but this test continued to fail when run through the WPT +
safaridriver tooling.

It turns out that we're just never propagating the mousemove event
deltas before sending NSEvent instances in
WebAutomationSession::platformSimulateMouseInteraction. To fix this, we
make two changes:

1. Keep track of the previous mouse click by calling into
WebAutomationSession::updateClickCount().
2. Follow the precedent set by EventSenderProxy in WKTR and assign the
deltaX/Y fields of a CGEvent, finally initializing an NSEvent from it.

No new tests because we do not expect WebKit behavior to change.

* Source/WebKit/UIProcess/Automation/WebAutomationSession.h:

Provide default values to the maxTime and maxDistance arguments in
WebAutomationSession::updateClickCount(). This matches the time and
distance heuristics used in EventSenderProxy::updateClickCountForButton.

* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction):

Canonical link: https://commits.webkit.org/267367@main
@webkit-commit-queue
Copy link
Collaborator

Committed 267367@main (7d047e3): https://commits.webkit.org/267367@main

Reviewed commits have been landed. Closing PR #17089 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 7d047e3 into WebKit:main Aug 28, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 28, 2023
@aprotyas aprotyas deleted the eng/260633 branch August 28, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Events For bugs related to user interactions like keyboard, mouse, and touch events.
Projects
None yet
4 participants