New issue
Advanced search Search tips

Issue 781966 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 778289



Sign in to add a comment

Change user gesture token creation based on every single pointerevent

Project Member Reported by nzolghadr@chromium.org, Nov 6 2017

Issue description

Right now the logic of creating a new user gesture token is based on the whole group of touch points in the WebTouchEvent.
The logic should be separated for each point so we can get rid of WebTouchEvent being passed around.
 
Blocking: 778289
Status: Started (was: Assigned)
As we discussed offline, creating user activation (gesture) independently for PointerEvents vs TouchEvents seems to be a cleaner option to me.  This could potentially allow two popups for a single user action (one through touchend handler, another through pointerup handler) but it's not a big deal in my opinion since FF already allows unlimited popups per gesture.

The alternate approach ("combine" these two into a single activation) needs to cache the current UserGestureToken and reuse it later on to initialize UserGestureIndicator again.  This is a use case of UGI I find questionable because UGI's token consolidation technique is not clean.  There are still a few remaining users of the constructor UserGestureIndicator(UserGestureToken) I hope to remove one day.  So I discourage this alternate.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 7 2017

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

commit c2dcc712d18f9e4ebc4eccacd20d959befec9113
Author: Navid Zolghadr <nzolghadr@chromium.org>
Date: Thu Dec 07 23:06:42 2017

Create gesture tokens for each touch pointer

Before this CL we were creating one token
for the whole touch event bundle. Now we create
one for the first pointer and store it as a class
attribute and reset it after flush events.
This way it is shared across the touch events
and their corresponding pointer events and it is
always cleared after sending touch events whether
it was consumed or not.

Bug:  781966 
Change-Id: Iccc8ea5c8a7cf3d3ee4620842395444d6e43025e
Reviewed-on: https://chromium-review.googlesource.com/785871
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522596}
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/LayoutTests/fast/events/touch/multi-touch-user-gesture.html
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/EventHandler.h
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/MouseEventManager.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/PointerEventManager.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/PointerEventManager.h
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/core/input/TouchEventManager.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/Source/platform/WebPointerEvent.cpp
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/public/platform/WebInputEvent.h
[modify] https://crrev.com/c2dcc712d18f9e4ebc4eccacd20d959befec9113/third_party/WebKit/public/platform/WebPointerEvent.h

Status: Fixed (was: Started)

Sign in to add a comment