Bug
1826208 [wpt PR 39347] - Event Timing flush pointerdown & keydown on contextmenu, a=testonly
Automatic update from web-platform-tests
Event Timing flush pointerdown & keydown on contextmenu (#39347)
* Previous undesired outcome: When right click brings up contextmenu,
the pointerdown or keydown entry is missing the first time you do so.
* Root cause: Pointerdown or keydown entries are deferred notifying PO
until pointercancel/pointerup or keyup. When pointerdown is only
followed by a contextmenu, the pointerdown/keydown entry would get stuck
in the map. The stuck entry can only be rescued when a new pointerdown
comes in to substitute it out. This explains why only the first
pointerdown was missing. It also explains why all subsequent right
clicks were printing pointerdowns, but are actually the incorrect
previous ones stuck in the map.
* This CL address it by: starting a timer to flush all pointerdown,
pointerup, and keydown entries upon contextmenu. We do a timer because
there exist cases where we do see a pointerup following the contextmenu
right after, in that case we would stop the timer and match pointerdown
pointerup with the same interactionId as usual.
Bug:
1413096,
1428603
Change-Id: I03e9cdbe57c146fe61e6758b39249048aa982897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
4288967
Reviewed-by: Michal Mocny <mmocny@chromium.org>
Commit-Queue: Aoyuan Zuo <zuoaoyuan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1228546}
Co-authored-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
--
wpt-commits:
6fd5c632669a5edab2676565976559dd6b2e284d
wpt-pr: 39347