Closed Bug 2042609 Opened 6 months ago Closed 6 months ago

[wpt-sync] Sync PR 60185 - EventTiming: Fix two instances of nested click handling

Categories

(Core :: DOM: Performance APIs, task, P4)

task

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Scott Haseley <shaseley@chromium.org> wrote:

EventTiming: Fix two instances of nested click handling

This CL fixes two instances where input events, specifically clicks, can
be nested within another click event:

  1. Nested clicks happen when a label is clicked and the click is
    forwarded to a form control. This was actually causing a crash in
    soft navs because we detect a soft nav context mismatch (outer
    context vs. inner context). This CL fixes this by assigning an
    interactionId of 0, which matches Safari and FF's behavior. I've
    added a WPT for this as well.

  2. Due to scheduling races, it's possible to process a queued input
    event in a nested event loop triggered in a click, e.g. if the click
    event handler calls window.print(). The nested event will run, but
    the downstream the events don't fire because the context is paused.
    Really we shouldn't be running the events at all, but for now we
    just ignore them for event timing, matching what happens downstream.

    I'll try to follow-up with a regression test for this, but it may
    be impractical due to the race.

Bug: 500983020
Change-Id: I40c6918c2222aec28b1cbeaeafa57ba383192e4a

Reviewed-on: https://chromium-review.googlesource.com/7870025
WPT-Export-Revision: 82ebd4c6aa73fb9aacad964d68b0b260043ce463

Component: web-platform-tests → DOM: Performance APIs
Product: Testing → Core

CI Results

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

Total 74 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 70[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] 71[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[GitHub] 170[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] 171[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
ERROR: 1[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] 2[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
FAIL : 1

Safari

OK : 1
PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b56fb86c3f01 https://hg.mozilla.org/integration/autoland/rev/a920a4bae4c0 [wpt PR 60185] - EventTiming: Fix two instances of nested click handling, a=testonly
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.