New issue
Advanced search Search tips

Issue 697102 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Unidirectional touch-action filtering is broken for opposite diagonal swipe

Project Member Reported by mustaq@chromium.org, Feb 28 2017

Issue description

We currently allow perfectly diagonal scroll-begin gestures unconditionally because we fix the scroll-update event offsets later on:
https://cs.chromium.org/chromium/src/content/browser/renderer_host/input/touch_action_filter.cc?rcl=e2b40672176fdec1dd2ae3768105ce1bdfa1ca97&l=199

This was fine when we didn't have unidirectional (left/right/up/down) touch-actions.

With unidirectional touch-actions, this wrongly allows scrolling if the swipe is towards the opposite diagonal *exactly*. To clarify, if only left-swipe is allowed, a right-up-swipe shouldn't cause panning but it currently does.

Hard to repro manually because it's impossible to swipe along the exact opposite diagonal. But it's a clear bug.

 

Comment 1 by mustaq@chromium.org, Feb 28 2017

Status: Started (was: Assigned)

Comment 2 by rbyers@chromium.org, Feb 28 2017

Nice find (probably my fault).  Thanks!
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 15 2017

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

commit 4d73d6ea6360a1a74625a2f9ac3a0eab8ef3cfb2
Author: mustaq <mustaq@chromium.org>
Date: Wed Mar 15 17:54:38 2017

Fixed a bug in TouchActionFilter for unidirectional touch-actions.

This CL simplifies the touch-action filtering code and fixes a crack
introduced through unidirectional touch action support. Touch-actions
left/right/up/down should never allow opposite exact diagonal swipes
even though still allowing diagonals towards the touch-action direction
as before.

BUG= 697102 

Review-Url: https://codereview.chromium.org/2753533002
Cr-Commit-Position: refs/heads/master@{#457133}

[modify] https://crrev.com/4d73d6ea6360a1a74625a2f9ac3a0eab8ef3cfb2/content/browser/renderer_host/input/input_router_impl_unittest.cc
[modify] https://crrev.com/4d73d6ea6360a1a74625a2f9ac3a0eab8ef3cfb2/content/browser/renderer_host/input/touch_action_filter.cc
[modify] https://crrev.com/4d73d6ea6360a1a74625a2f9ac3a0eab8ef3cfb2/content/browser/renderer_host/input/touch_action_filter_unittest.cc

Comment 4 by mustaq@chromium.org, Mar 15 2017

Status: Fixed (was: Started)

Sign in to add a comment