New issue
Advanced search Search tips

Issue 607588 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 471824



Sign in to add a comment

Prevent-defaulting only pointerdowns makes TE sequence invalid

Project Member Reported by mustaq@chromium.org, Apr 28 2016

Issue description

0. Run Chrome with PointerEvents enabled.
1. Open rbyers.github.io/eventTest.html, turn on {PointerEvents, TouchEvents, prevent-default-pointerdown} in config.
2. Tap on the screen.
3. Observe the touch event sequence.

What is the expected result?
We should see either both touchstart & touchend, or none of them.

What happens instead of that?
We see only touchend.

Why?
Our current implementation suppresses the TouchPoints in a TE for which PE was prevent-defaulted. This is done to indirectly prevent ME generation from gesture events generated from the TE (right?). Since pointerup was not prevent-defaulted in this repro, we are seeing only the touchend from JS.


 

Comment 1 by mustaq@chromium.org, Apr 28 2016

Edge sends both touchstart & touchend.
Labels: -Pri-3 M-52 Pri-1
Blocking: 471824
Status: Started (was: Assigned)

Comment 5 by rbyers@chromium.org, May 27 2016

> Edge sends both touchstart & touchend.

Interesting.  So there's apparently no way to suppress the TE generation in Edge?  That seems unfortunate (risk of double-handling, inconsistency with MEs, etc.).  But for now I'm fine matching Edge here.  We just may want to come back to it (still need to spec this sort of thing somewhere).

Comment 6 by mustaq@chromium.org, May 27 2016

A. Yes, there's a risk of PE/TE double-handling, and spec should say something. An implementation independent yet precise behaviour could be tricky.

B. Making legacy MEs consistent across both TE & PE needs a well-defined PE->TE suppression behavior. Depends on A.

I will track it separately.
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 1 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Pri-1 Pri-2
I don't think this is P1, as pointer events isn't on by default. Downgrading to P2.
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1904837ebb6f8f352572e0f833e14640a0db6d54

commit 1904837ebb6f8f352572e0f833e14640a0db6d54
Author: mustaq <mustaq@chromium.org>
Date: Thu Jun 16 21:39:32 2016

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}

[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/components/test_runner/event_sender.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/components/test_runner/event_sender.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/content/browser/renderer_host/input/web_input_event_util_unittest.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/content/browser/renderer_host/ui_events_helper.cc
[add] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-mouse-expected.txt
[add] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-mouse.html
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-tap-setrangetext-with-events.html
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-pointer-events-expected.txt
[add] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-pointer-mouse-expected.txt
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-pointercancel-expected.txt
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/EventHandler.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/PointerEventManager.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/PointerEventManager.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/TouchEventManager.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/core/input/TouchEventManager.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/platform/PlatformGestureEvent.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/platform/PlatformTouchEvent.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/web/WebInputEvent.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/web/WebInputEventConversion.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/third_party/WebKit/public/web/WebInputEvent.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/blink/blink_event_util.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/blink/blink_event_util.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/blink/blink_event_util_unittest.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/event.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/event.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_event_data.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_event_data.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_event_data_packet.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_event_data_packet.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_event_data_packet_unittest.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/gesture_provider.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/touch_disposition_gesture_filter.h
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gestures/gesture_provider_aura.cc
[modify] https://crrev.com/1904837ebb6f8f352572e0f833e14640a0db6d54/ui/events/gestures/gesture_provider_aura.h

Status: Fixed (was: Started)

Sign in to add a comment