Suppressed MEs for gestures from cancelled PEs
Our current implementation suppresses the touch-points
for which the pointerevents have been canceled, to mimic
the ME suppression behavior of PointerEvents. In Edge,
however, TEs are fired as-is without considering the
canceling status of pointerdowns. We need to follow the
Edge behavior here for better web-compat.
Moreover, since preventing a pointerdown suppresses MEs,
this should be true for the MEs from gestures that are
ultimately triggered by TEs, when the PEs corresponding
to the TEs are canceled (crbug.com/606938).
In addition, the current implementation (suppressing
touch-points for canceled pointerevents) has a few bad
side-effects:
- TE sequence can become inconsistent (eg touchend w/o
toushstart) for certain sequences of PE canceling
(crbug.com/607588).
- Preventing all PEs completely hides TEs but until touch
scroll starts, which suppresses PEs only to "reveal" the
hidden TE sequence from "middle" (crbug.com/507408).
This CL adds a unique-touch-id queue in PointerEventManager
to properly suppress MEs from GestureTap, and makes TE
firing independent of PE handling in JS. This CL also
suppresses some default behavior associated with a
tap on canceled pointerdowns (e.g. focusing an input
field).
The MEs from GestureLongPress are left as-is in this CL
because suppressing them could break drag-drop; this will
be done separately in a follow-up CL.
BUG=606938,607588,507408
Review-Url: https://codereview.chromium.org/1989623002
Cr-Commit-Position: refs/heads/master@{#400264}
38 files changed