script: Include click count as the detail of mouseup and mousedown 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 <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson
2026-01-12 09:47:20 +01:00
committed by GitHub
parent f9a328a972
commit 3cda70dbbb
7 changed files with 282 additions and 74 deletions

View File

@@ -12919,6 +12919,15 @@
]
},
"input-events": {
"dblclick-events-fired-every-two-clicks.html": [
"9ad53ceaf05018bb48e4ff2424da4e45fbca6be6",
[
null,
{
"testdriver": true
}
]
],
"input-events-textarea-cut-paste.html": [
"7e1151d222b5a5210921345a3e60434194cd1794",
[
@@ -12936,6 +12945,15 @@
"testdriver": true
}
]
],
"mouse-button-events-detail-increases-indefinitely.html": [
"6bf57fe3accad4d3cbfb454e10f31b0a8540b5a5",
[
null,
{
"testdriver": true
}
]
]
},
"mozilla": {