Closed Bug 2022291 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 58393 - Preserve pointer metadata and isTrusted for label-forwarded clicks

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Peng Zhou <pengzhou@chromium.org> wrote:

Preserve pointer metadata and isTrusted for label-forwarded clicks

Clicks forwarded from \<label> to its associated control are
synthesized in SimulatedEventUtil. For kFromUserAgent pointer clicks,
we were not propagating pointer metadata from the underlying
PointerEvent, and forwarded clicks could be marked trusted even when
the underlying click was untrusted (e.g. label.click).

Update simulated pointer click creation to:

  • default to a non-pointer reserved pointerId;
  • copy pointerId, pointerType, isPrimary, and detail from the
    underlying PointerEvent when available;
  • mark the event trusted for kFromUserAgent only when there is no
    underlying event or the underlying event itself is trusted.

Bug: 450581754
Change-Id: I3fec917181566c7c9ed469475b8ab0fdedcc2f33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7640679
Reviewed-by: Kevin Ellis \<kevers@chromium.org>
Commit-Queue: Peng Zhou \<pengzhou@chromium.org>
Commit-Queue: Mustaq Ahmed \<mustaq@chromium.org>
Reviewed-by: Mustaq Ahmed \<mustaq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1597108}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 11 tests and 4 subtests

Status Summary

Firefox

OK : 1[GitHub] 11[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-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PASS: 2[GitHub] 150[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-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
FAIL: 9

Chrome

OK : 1
FAIL: 2

Safari

OK : 1
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e15288107cd9 https://hg.mozilla.org/integration/autoland/rev/819cb66a33fd [wpt PR 58393] - Preserve pointer metadata and isTrusted for label-forwarded clicks, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.