Skip to content

script: Use constellation event's mouse button state instead of tracking count - #60647

Closed
servo-wpt-sync wants to merge 1 commit into
web-platform-tests:masterfrom
servo:servo_export_45628
Closed

servo-wpt-sync wants to merge 1 commit into
web-platform-tests:masterfrom
servo:servo_export_45628

Conversation

@servo-wpt-sync

@servo-wpt-sync servo-wpt-sync commented Jun 15, 2026 •

Copy link
Copy Markdown
Collaborator

Instead of keeping track of the number of mouse buttons currently pressed from within the document event handler, we use the input event from the constellation as the source of truth for currently pressed mouse buttons. This fixes an issue where the internal count would permanently increase, preventing the firing of pointerup/pointerdown events.
This also fixes an issue where the buttons field of pointer capture boundary transition events was improperly set to a button count instead of an integer bitmap.

Testing: A test was added for the buttons field behavior. For the non-firing pointerup/pointerdown events, is this something testable with WPT? It's caused by the embedder not sending a corresponding mouse up event with a mouse down one, so I'm not sure if WPT can enable us to test this. Please let me know!
Fixes: Partially fixes servo/servo#45491, prevents pointerup/pointerdown events from breaking entirely.
Reviewed in servo/servo#45628

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

Signed-off-by: Oskar Steiger <steigeo@rose-hulman.edu>
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator Author

👋 Downstream pull request (servo/servo#45628) no longer contains any upstreamable changes. Closing pull request without merging.

@servo-wpt-sync
servo-wpt-sync deleted the servo_export_45628 branch August 19, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mouseup events are not sent if mouse is dragged off page

3 participants