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

Issue 293683002: Synthetic pinch gesture take scale factor as parameter. (Closed)

Created:
6 years, 7 months ago by Dominik Grewe
Modified:
6 years, 7 months ago
Reviewers:
kenrb, jdduke (slow), Sami, piman
CC:
chromium-reviews, extensions-reviews_chromium.org, jam, darin-cc_chromium.org, piman+watch_chromium.org, chromium-apps-reviews_chromium.org, jdduke+watch_chromium.org, telemetry+watch_chromium.org
Visibility:
Public.

Description

Synthetic pinch gesture take scale factor as parameter. Instead of a zoom direction and the number of pixels to be covered by the pinch gesture, the gesture now takes a scale factor as parameter. From that, it computes how to perform the gesture: the ratio of the final span and the initial span equals the scale factor (modulo touch slop). The spans must not fall below a certain threshold, provided by the gesture target (GetMinScalingSpanInDips). Update the JS interface (chrome.gpuBenchmarking.pinchBy) to reflect the changes. For (temporary) backwards compatibility, add another method to the interface to tell Telemetry whether or not the browser supports the new interface. This is to avoid crashes when Telemetry is run with the current stable version. Will be removed once the stable version supports the new interface. Update tough_pinch_zoom_cases page set to make sure all pinch gestures start within the web content (tested on N4 and N10). Update synthetic gesture controller unit tests to use the new parameter. BUG=309484 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272359

Patch Set 1 : #

Total comments: 16

Patch Set 2 : comments #

Total comments: 2

Patch Set 3 : Make touch slop integer for testing. #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -105 lines) Patch
M content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc View 1 2 12 chunks +34 lines, -19 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target.h View 1 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_android.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_android.cc View 1 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_aura.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_aura.cc View 1 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_base.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/synthetic_gesture_target_base.cc View 1 2 chunks +9 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_pinch_gesture.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/input/synthetic_pinch_gesture.cc View 5 chunks +31 lines, -31 lines 0 comments Download
M content/common/input/input_param_traits_unittest.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M content/common/input/synthetic_pinch_gesture_params.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/common/input/synthetic_pinch_gesture_params.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M content/common/input_messages.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/gpu/gpu_benchmarking_extension.cc View 3 chunks +14 lines, -15 lines 0 comments Download
M tools/perf/page_sets/tough_pinch_zoom_cases.py View 1 2 3 4 chunks +23 lines, -4 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/pinch.js View 2 chunks +3 lines, -6 lines 0 comments Download
M tools/telemetry/telemetry/page/actions/pinch.py View 1 2 3 4 chunks +18 lines, -10 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Dominik Grewe
ptal, thanks. https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_pinch_gesture.cc File content/browser/renderer_host/input/synthetic_pinch_gesture.cc (left): https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_pinch_gesture.cc#oldcode94 content/browser/renderer_host/input/synthetic_pinch_gesture.cc:94: // needed for negative values. I can't ...
6 years, 7 months ago (2014-05-19 13:45:50 UTC) #1
Sami
Thanks Dominik, just a few nits below. https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode200 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:200: total_num_pixels_covered_(0), Do ...
6 years, 7 months ago (2014-05-19 14:49:04 UTC) #2
jdduke (slow)
https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_target.h File content/browser/renderer_host/input/synthetic_gesture_target.h (right): https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_target.h#newcode45 content/browser/renderer_host/input/synthetic_gesture_target.h:45: virtual int GetTouchSlopInDips() const = 0; We should be ...
6 years, 7 months ago (2014-05-19 15:21:10 UTC) #3
Dominik Grewe
Thanks. https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc File content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc (right): https://codereview.chromium.org/293683002/diff/20001/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc#newcode200 content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc:200: total_num_pixels_covered_(0), On 2014/05/19 14:49:04, Sami wrote: > Do ...
6 years, 7 months ago (2014-05-19 17:31:42 UTC) #4
Sami
Thanks Dominik. lgtm!
6 years, 7 months ago (2014-05-20 17:11:49 UTC) #5
jdduke (slow)
Oops, sorry didn't see the response. lgtm.
6 years, 7 months ago (2014-05-20 17:25:03 UTC) #6
Dominik Grewe
Thanks. Adding piman for review of content/
6 years, 7 months ago (2014-05-20 17:34:32 UTC) #7
Dominik Grewe
+kenrb for security review of content/common/input_messages.h
6 years, 7 months ago (2014-05-20 17:35:39 UTC) #8
kenrb
lgtm
6 years, 7 months ago (2014-05-20 19:27:31 UTC) #9
piman
https://codereview.chromium.org/293683002/diff/30001/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc File content/browser/renderer_host/input/synthetic_gesture_target_aura.cc (right): https://codereview.chromium.org/293683002/diff/30001/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc#newcode142 content/browser/renderer_host/input/synthetic_gesture_target_aura.cc:142: return ui::GestureConfiguration::min_distance_for_pinch_scroll_in_pixels(); No DIPs for Aura?
6 years, 7 months ago (2014-05-20 21:10:11 UTC) #10
jdduke (slow)
https://codereview.chromium.org/293683002/diff/30001/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc File content/browser/renderer_host/input/synthetic_gesture_target_aura.cc (right): https://codereview.chromium.org/293683002/diff/30001/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc#newcode142 content/browser/renderer_host/input/synthetic_gesture_target_aura.cc:142: return ui::GestureConfiguration::min_distance_for_pinch_scroll_in_pixels(); On 2014/05/20 21:10:11, piman wrote: > No ...
6 years, 7 months ago (2014-05-20 21:13:01 UTC) #11
piman
LGTM then, but o.O
6 years, 7 months ago (2014-05-20 21:15:46 UTC) #12
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 7 months ago (2014-05-21 08:41:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/293683002/30001
6 years, 7 months ago (2014-05-21 08:42:51 UTC) #14
Dominik Grewe
The CQ bit was unchecked by dominikg@chromium.org
6 years, 7 months ago (2014-05-21 12:28:29 UTC) #15
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 7 months ago (2014-05-21 13:15:23 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/293683002/50001
6 years, 7 months ago (2014-05-21 19:57:51 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-22 09:48:54 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-22 15:49:33 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/11121)
6 years, 7 months ago (2014-05-22 15:49:34 UTC) #20
Dominik Grewe
The CQ bit was checked by dominikg@chromium.org
6 years, 7 months ago (2014-05-22 17:03:41 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/293683002/70001
6 years, 7 months ago (2014-05-22 17:05:52 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-22 23:13:14 UTC) #23
Message was sent while issue was closed.
Change committed as 272359

Powered by Google App Engine
This is Rietveld 408576698