Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 2726623002: Fixed two-finger pan filtering with 'touch-action: pan-x pan-y'. (Closed)

Created:
3 years, 9 months ago by mustaq
Modified:
3 years, 9 months ago
Reviewers:
dtapuska, Rick Byers
CC:
chromium-reviews, jam, darin-cc_chromium.org, dtapuska+chromiumwatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed two-finger pan filtering with 'touch-action: pan-x pan-y'. For touch-action filtering, we treat a two-finger pan like a single-finger pan. As a result, a 'touch-action: pan-x pan-y' region allows two-finger panning but disallows pinch-zooming. This looks problematic: - It is not easy for users to distinguish between two-finger panning vs pinching. - Edge's touch-action filtering treats a two-finger pan like a pinch-zoom for a while. - Popular embedded maps need to distinguish between two-finger vs one-finger gestures through touch-action, where a two-finger gestures is used to manipulate the map while a one-finger gesture is handled by the browser. Here is a mock: http://mustaqahmed.github.io/web/image-panning.html This CL filters a two-finger pan like a pinch-zoom to solve this problem. In addition to solving the bug, this CL also simplified the touch-action filtering code around panning/zooming. BUG=632525 Review-Url: https://codereview.chromium.org/2726623002 Cr-Commit-Position: refs/heads/master@{#456722} Committed: https://chromium.googlesource.com/chromium/src/+/16ce460b6793b9fff0c1d4cc72deab60b921a159

Patch Set 1 #

Total comments: 2

Patch Set 2 : Non-const ref param -> pointer #

Total comments: 4

Patch Set 3 : Dave's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -90 lines) Patch
M content/browser/renderer_host/input/touch_action_filter.h View 1 2 2 chunks +10 lines, -14 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter.cc View 1 2 8 chunks +47 lines, -49 lines 0 comments Download
M content/browser/renderer_host/input/touch_action_filter_unittest.cc View 1 12 chunks +33 lines, -25 lines 0 comments Download
M content/common/input/synthetic_web_input_event_builders.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/input/synthetic_web_input_event_builders.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 17 (8 generated)
mustaq
ptal
3 years, 9 months ago (2017-02-28 18:21:12 UTC) #2
dtapuska
https://codereview.chromium.org/2726623002/diff/1/content/browser/renderer_host/input/touch_action_filter.h File content/browser/renderer_host/input/touch_action_filter.h (right): https://codereview.chromium.org/2726623002/diff/1/content/browser/renderer_host/input/touch_action_filter.h#newcode30 content/browser/renderer_host/input/touch_action_filter.h:30: bool FilterGestureEvent(blink::WebGestureEvent& gesture_event); If this is an output parameter ...
3 years, 9 months ago (2017-02-28 18:29:35 UTC) #3
mustaq
https://codereview.chromium.org/2726623002/diff/1/content/browser/renderer_host/input/touch_action_filter.h File content/browser/renderer_host/input/touch_action_filter.h (right): https://codereview.chromium.org/2726623002/diff/1/content/browser/renderer_host/input/touch_action_filter.h#newcode30 content/browser/renderer_host/input/touch_action_filter.h:30: bool FilterGestureEvent(blink::WebGestureEvent& gesture_event); On 2017/02/28 18:29:35, dtapuska wrote: > ...
3 years, 9 months ago (2017-02-28 19:27:01 UTC) #4
dtapuska
https://codereview.chromium.org/2726623002/diff/20001/content/browser/renderer_host/input/touch_action_filter.cc File content/browser/renderer_host/input/touch_action_filter.cc (right): https://codereview.chromium.org/2726623002/diff/20001/content/browser/renderer_host/input/touch_action_filter.cc#newcode55 content/browser/renderer_host/input/touch_action_filter.cc:55: if (IsYAxisActionDisallowed(allowed_touch_action_)) { I think this might be wrong ...
3 years, 9 months ago (2017-03-13 19:17:35 UTC) #5
mustaq
ptal. https://codereview.chromium.org/2726623002/diff/20001/content/browser/renderer_host/input/touch_action_filter.cc File content/browser/renderer_host/input/touch_action_filter.cc (right): https://codereview.chromium.org/2726623002/diff/20001/content/browser/renderer_host/input/touch_action_filter.cc#newcode55 content/browser/renderer_host/input/touch_action_filter.cc:55: if (IsYAxisActionDisallowed(allowed_touch_action_)) { On 2017/03/13 19:17:35, dtapuska wrote: ...
3 years, 9 months ago (2017-03-13 20:37:01 UTC) #7
dtapuska
On 2017/03/13 20:37:01, mustaq wrote: > ptal. > > https://codereview.chromium.org/2726623002/diff/20001/content/browser/renderer_host/input/touch_action_filter.cc > File content/browser/renderer_host/input/touch_action_filter.cc (right): > ...
3 years, 9 months ago (2017-03-13 20:39:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2726623002/40001
3 years, 9 months ago (2017-03-14 16:16:39 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/16ce460b6793b9fff0c1d4cc72deab60b921a159
3 years, 9 months ago (2017-03-14 16:23:29 UTC) #16
qyearsley
3 years, 9 months ago (2017-03-14 18:39:23 UTC) #17
Message was sent while issue was closed.
On 2017/03/14 at 16:23:29, commit-bot wrote:
> Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/16ce460b6793b9fff0c1d4cc72de...

Good news! This causes a test to start passing:

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=ex...

I'll make a rebaseline CL real quick to update the expectations.

Powered by Google App Engine
This is Rietveld 408576698