Skip to content

script: Include click count as the detail of mouseup and mousedown events#41833

Merged
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:improve-click-counting
Jan 12, 2026
Merged

script: Include click count as the detail of mouseup and mousedown events#41833
mrobinson merged 1 commit intoservo:mainfrom
mrobinson:improve-click-counting

Conversation

@mrobinson
Copy link
Copy Markdown
Member

@mrobinson mrobinson commented Jan 11, 2026

This change improves the counting of clicks for mouse button events by
ensuring that detail property of those events includes the click
count. This detail differs from that of dblclick events where the
detail is always 2. In addition, it ensures that the click count can
increase for mouse buttons that do not cause click and dblclick
events (such as the right mouse button).

Testing: This change adds two Servo-specific WPT-style tests. While this
behavior is specified a bit, the details are implementation specific.

@mrobinson mrobinson requested a review from gterzian as a code owner January 11, 2026 09:25
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 11, 2026
@mrobinson mrobinson force-pushed the improve-click-counting branch from 2848ea3 to 55c75a9 Compare January 11, 2026 09:51
Copy link
Copy Markdown
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

Seems logical to follow, thanks for the great comments in the code that explain what's going on here.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 11, 2026
@mrobinson mrobinson added this pull request to the merge queue Jan 12, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 12, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 12, 2026
…wn` events (#41833)

This change improves the counting of clicks for mouse button events by
ensuring that `detail` property of those events includes the click
count. This `detail` differs from that of `dblclick` events where the
`detail` is always 2. In addition, it ensures that the click count can
increase for mouse buttons that do not cause `click` and `dblclick`
events (such as the right mouse button).

Testing: This change adds two Servo-specific WPT-style tests. While this
behavior is specified a bit, the details are implementation specific.

Signed-off-by: Martin Robinson <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 12, 2026
…wn` events

This change improves the counting of clicks for mouse button events by
ensuring that `detail` property of those events includes the click
count. This `detail` differs from that of `dblclick` events where the
`detail` is always 2. In addition, it ensure that the click count can
increase for mouse buttons that do not cause `click` and `dblclick`
events (such as the right mouse button).

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson mrobinson force-pushed the improve-click-counting branch from 55c75a9 to c40e3af Compare January 12, 2026 08:32
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 12, 2026
@mrobinson mrobinson enabled auto-merge January 12, 2026 08:33
@mrobinson mrobinson added this pull request to the merge queue Jan 12, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 12, 2026
Merged via the queue into servo:main with commit 3cda70d Jan 12, 2026
32 checks passed
@mrobinson mrobinson deleted the improve-click-counting branch January 12, 2026 09:32
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants