Bug 262109 - Web Automation: Dispatched mouse events always have `buttons` property set to zero
Summary: Web Automation: Dispatched mouse events always have `buttons` property set to...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Abrar Rahman Protyasha
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-26 04:58 PDT by Abrar Rahman Protyasha
Modified: 2023-09-27 12:49 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abrar Rahman Protyasha 2023-09-26 04:58:11 PDT
The `buttons` property on mouse events dispatched by WebAutomationSession is always zero, and does not correctly reflect what mouse button is pressed. I suspect the fix involves swizzling the `+[NSEvent pressedMouseButtons]` like in WKTR/DRT.

This will get us to fully pass the pointerevents/pointerevent_attributes_hoverable_pointers.html?mouse WPT.
Comment 1 Radar WebKit Bug Importer 2023-09-26 05:00:49 PDT
<rdar://problem/116049187>
Comment 2 Abrar Rahman Protyasha 2023-09-27 00:00:16 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18265
Comment 3 EWS 2023-09-27 12:49:45 PDT
Committed 268529@main (e120ba1e5646): <https://commits.webkit.org/268529@main>

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