Closed Bug 2091605 Opened 5 days ago Closed 1 day ago

[wpt-sync] Sync PR 64415 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=327770

Categories

(Core :: DOM: Events, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64415 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64415
Details from upstream follow.

Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=327770

WebKit export from bug: MouseEvent constructor and initMouseEvent(<!---->)<!----> remap button -<!---->2 to 0

<pre>
MouseEvent constructor and initMouseEvent() remap button -2 to 0

MouseButton::None is -2 and is used internally as a "no button" sentinel.
The MouseEventInit constructor and initMouseEvent() applied the same
remapping to script-provided values, so new MouseEvent("x", { button: -2 })
and initMouseEvent(..., -2, ...) reported button == 0 instead of -2.
button is an unconstrained short in the IDL, and -2 was the only value in
its range that was altered. Firefox and Blink both preserve it.

Script-created events cannot carry the sentinel, so store the value as
given and always treat the button as down. The constructors used for
trusted events keep the sentinel handling, and the initializer constructor
now asserts that a trusted event never carries MouseButton::None.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=327770">https://bugs.webkit.org/show_bug.cgi?id=327770</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/325341@main">https://commits.webkit.org/325341@main</a>
</pre>

Component: web-platform-tests → DOM: Events
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 24 tests and 11 subtests

Status Summary

Firefox

OK : 1[GitHub] 23[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 59[GitHub] 204[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 205[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 7[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 8[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Chrome

OK : 1
PASS: 55
FAIL: 4

Safari

OK : 1
PASS: 54
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.