New issue
Advanced search Search tips

Issue 783168 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Computed white-listed touch action is incorrect

Project Member Reported by xidac...@chromium.org, Nov 9 2017

Issue description

The touch action computed by EventListenerTypeForTouchStartOrMoveAt is incorrect. We can use this example: http://output.jsbin.com/fovofuh/1

The blue rect has pan-y and the light green rect has pan-x, when clicking at the overlapping section, we should get none, however we got pan-x.

Reason: the EventListenerTypeForTouchStartOrMoveAt tries to find the closest layer that we hit, and try to retrieve the touch action from that layer. This is wrong, we should get the touch action of all the layers that it gets and do a '&' operation to get the most restricted touch action.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 20 2017

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

commit f0006b1e43a1ea0d9ea25aaf898caa5985225790
Author: Xida Chen <xidachen@chromium.org>
Date: Mon Nov 20 23:26:38 2017

Fix white-listed touch action computation

In our current implementation, we first try to find the closest layer
that a touch point hit, and then extract the white listed touch action
from that layer.  This is done in the function
EventListenerTypeForTouchStartOrMoveAt. When we extract the white listed
touch action from the closest layer, we are doing it wrong because we
use the device viewport point which doesn't account for the screen
space transform, device scale factor, etc.

This CL fixes the problem. In FindLayerThatIsHitByPointInTouchHandlerRegion,
we are going through each layer to check whether this layer is hit by
the touch point or not. All we need to is pass a out_touch_action, and
once we find the closest layer that is hit by the touch point, we do
out_touch_action = this layer's touch action.

Bug:  783168 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I626031b1f7a3009620379c8b51ab2ec6a98f16b3
Reviewed-on: https://chromium-review.googlesource.com/760857
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517983}
[modify] https://crrev.com/f0006b1e43a1ea0d9ea25aaf898caa5985225790/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/f0006b1e43a1ea0d9ea25aaf898caa5985225790/cc/trees/layer_tree_host_impl_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment