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

Issue 2138883002: Fix computation of scroll amount in scroll actions. (Closed)

Created:
4 years, 5 months ago by ulan
Modified:
4 years, 5 months ago
CC:
catapult-reviews_chromium.org, telemetry-reviews_chromium.org
Base URL:
https://github.com/catapult-project/catapult.git@master
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Fix computation of scroll amount in scroll actions. During page load window.innerHeight/Width can exceed window.outerHeight/Width, which results in synthetic touch coordinates being outside the screen. Chrome crashes with assertion failure for such invalid coordinates. This patch uses chrome.gpuBenchmarking.visualViewportHeight/Width adjusted with chrome.gpuBenchmarking.pageScaleFactor to compute zoom-independent inner height/width of window. BUG=chromium:627166 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/d2b666834a289f8d109c5383fb16e7a9cba66145

Patch Set 1 #

Patch Set 2 : update comment #

Patch Set 3 : fix typo #

Total comments: 6

Patch Set 4 : Address Petr's comments #

Total comments: 1

Patch Set 5 : remove redundant '+' #

Patch Set 6 : add unit test for repeatable scroll #

Patch Set 7 : x #

Total comments: 2

Patch Set 8 : use PinchPage to zoom out #

Total comments: 8

Patch Set 9 : enable the test only for Android #

Patch Set 10 : remove old test #

Patch Set 11 : use chrome.gpuBenchmarking.visualViewportWidth/Height #

Patch Set 12 : x #

Patch Set 13 : use pageScaleFactor * visualViewportWidth/Height #

Patch Set 14 : fixes #

Total comments: 27

Patch Set 15 : Address comments #

Total comments: 2

Patch Set 16 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -151 lines) Patch
M telemetry/telemetry/internal/actions/drag.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -10 lines 0 comments Download
M telemetry/telemetry/internal/actions/drag.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -6 lines 0 comments Download
M telemetry/telemetry/internal/actions/drag_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -5 lines 0 comments Download
M telemetry/telemetry/internal/actions/gesture_common.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +28 lines, -12 lines 0 comments Download
M telemetry/telemetry/internal/actions/key_event_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/load_media.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M telemetry/telemetry/internal/actions/loop.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M telemetry/telemetry/internal/actions/media_action.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -8 lines 0 comments Download
M telemetry/telemetry/internal/actions/mouse_click.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -10 lines 0 comments Download
M telemetry/telemetry/internal/actions/pinch.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/pinch.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -5 lines 0 comments Download
M telemetry/telemetry/internal/actions/play.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M telemetry/telemetry/internal/actions/repeatable_scroll.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -4 lines 0 comments Download
M telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +38 lines, -9 lines 0 comments Download
M telemetry/telemetry/internal/actions/scroll.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/scroll.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -5 lines 0 comments Download
M telemetry/telemetry/internal/actions/scroll_bounce.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/scroll_bounce.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -5 lines 0 comments Download
M telemetry/telemetry/internal/actions/scroll_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +40 lines, -38 lines 0 comments Download
M telemetry/telemetry/internal/actions/seek.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M telemetry/telemetry/internal/actions/swipe.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/swipe.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -6 lines 0 comments Download
M telemetry/telemetry/internal/actions/tap.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -3 lines 0 comments Download
M telemetry/telemetry/internal/actions/tap.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -6 lines 0 comments Download
A telemetry/telemetry/internal/actions/utils.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (17 generated)
ulan
PTAL or redirect.
4 years, 5 months ago (2016-07-11 16:57:49 UTC) #2
nednguyen
lgtm if Petr is happy
4 years, 5 months ago (2016-07-11 17:01:36 UTC) #4
nednguyen
On 2016/07/11 17:01:36, nednguyen wrote: > lgtm if Petr is happy Actually not ready to ...
4 years, 5 months ago (2016-07-11 17:03:22 UTC) #5
ulan
On 2016/07/11 17:03:22, nednguyen wrote: > On 2016/07/11 17:01:36, nednguyen wrote: > > lgtm if ...
4 years, 5 months ago (2016-07-11 18:49:32 UTC) #9
ulan
nednguyen@, bokan@, ptal.
4 years, 5 months ago (2016-07-12 08:39:02 UTC) #12
petrcermak
LGTM with a few comments. Thanks, Petr https://codereview.chromium.org/2138883002/diff/40001/telemetry/telemetry/internal/actions/repeatable_scroll.py File telemetry/telemetry/internal/actions/repeatable_scroll.py (right): https://codereview.chromium.org/2138883002/diff/40001/telemetry/telemetry/internal/actions/repeatable_scroll.py#newcode25 telemetry/telemetry/internal/actions/repeatable_scroll.py:25: # Get ...
4 years, 5 months ago (2016-07-12 09:19:21 UTC) #13
ulan
Thanks, awesome comments! https://codereview.chromium.org/2138883002/diff/40001/telemetry/telemetry/internal/actions/repeatable_scroll.py File telemetry/telemetry/internal/actions/repeatable_scroll.py (right): https://codereview.chromium.org/2138883002/diff/40001/telemetry/telemetry/internal/actions/repeatable_scroll.py#newcode25 telemetry/telemetry/internal/actions/repeatable_scroll.py:25: # Get the dimensions of the ...
4 years, 5 months ago (2016-07-12 09:31:24 UTC) #14
petrcermak
Still LGTM :-) https://codereview.chromium.org/2138883002/diff/60001/telemetry/telemetry/internal/actions/repeatable_scroll.py File telemetry/telemetry/internal/actions/repeatable_scroll.py (right): https://codereview.chromium.org/2138883002/diff/60001/telemetry/telemetry/internal/actions/repeatable_scroll.py#newcode31 telemetry/telemetry/internal/actions/repeatable_scroll.py:31: '[Math.min(window.innerWidth, window.outerWidth),' + FYI, you don't ...
4 years, 5 months ago (2016-07-12 09:34:36 UTC) #15
ulan
On 2016/07/12 09:34:36, petrcermak wrote: > Still LGTM :-) > > https://codereview.chromium.org/2138883002/diff/60001/telemetry/telemetry/internal/actions/repeatable_scroll.py > File telemetry/telemetry/internal/actions/repeatable_scroll.py ...
4 years, 5 months ago (2016-07-12 09:39:17 UTC) #16
nednguyen
Do we have any existing test coverage that would catch the crash without this fix?
4 years, 5 months ago (2016-07-12 10:13:42 UTC) #17
ulan
On 2016/07/12 10:13:42, nednguyen wrote: > Do we have any existing test coverage that would ...
4 years, 5 months ago (2016-07-12 10:38:08 UTC) #18
nednguyen
On 2016/07/12 10:38:08, ulan wrote: > On 2016/07/12 10:13:42, nednguyen wrote: > > Do we ...
4 years, 5 months ago (2016-07-12 10:44:03 UTC) #19
petrcermak
On 2016/07/12 10:13:42, nednguyen wrote: > Do we have any existing test coverage that would ...
4 years, 5 months ago (2016-07-12 10:49:30 UTC) #20
ulan
On 2016/07/12 10:44:03, nednguyen wrote: > On 2016/07/12 10:38:08, ulan wrote: > > On 2016/07/12 ...
4 years, 5 months ago (2016-07-12 12:07:04 UTC) #21
petrcermak
It seems that it's possible to repro the conditions with the following steps (not sure ...
4 years, 5 months ago (2016-07-12 12:22:57 UTC) #22
ulan
Thank you for suggestion! It looks like Pinch action can zoom in, but cannot zoom ...
4 years, 5 months ago (2016-07-12 14:47:58 UTC) #23
petrcermak
I got your test running on Android with the following command: $ telemetry/bin/run_tests testRepeatableScrollActionNoRepeatsZoomed --browser=reference ...
4 years, 5 months ago (2016-07-12 15:10:27 UTC) #28
bokan
https://codereview.chromium.org/2138883002/diff/140001/telemetry/telemetry/internal/actions/repeatable_scroll.py File telemetry/telemetry/internal/actions/repeatable_scroll.py (right): https://codereview.chromium.org/2138883002/diff/140001/telemetry/telemetry/internal/actions/repeatable_scroll.py#newcode32 telemetry/telemetry/internal/actions/repeatable_scroll.py:32: ' Math.min(window.innerHeight, window.outerHeight)]') This might be ok as a ...
4 years, 5 months ago (2016-07-12 15:36:07 UTC) #29
ulan
Thank you all! https://codereview.chromium.org/2138883002/diff/140001/telemetry/telemetry/internal/actions/repeatable_scroll.py File telemetry/telemetry/internal/actions/repeatable_scroll.py (right): https://codereview.chromium.org/2138883002/diff/140001/telemetry/telemetry/internal/actions/repeatable_scroll.py#newcode32 telemetry/telemetry/internal/actions/repeatable_scroll.py:32: ' Math.min(window.innerHeight, window.outerHeight)]') On 2016/07/12 15:36:07, ...
4 years, 5 months ago (2016-07-12 16:57:04 UTC) #30
ulan
[+ymalik] Digging around more I found this CL from ymalik@: https://codereview.chromium.org/1400213002, which is solving the ...
4 years, 5 months ago (2016-07-13 19:04:07 UTC) #33
bokan
On 2016/07/13 19:04:07, ulan wrote: > [+ymalik] > > Digging around more I found this ...
4 years, 5 months ago (2016-07-13 19:26:50 UTC) #34
ulan
On 2016/07/13 19:26:50, bokan wrote: > On 2016/07/13 19:04:07, ulan wrote: > > [+ymalik] > ...
4 years, 5 months ago (2016-07-13 21:09:11 UTC) #35
bokan
On 2016/07/13 21:09:11, ulan wrote: > On 2016/07/13 19:26:50, bokan wrote: > > On 2016/07/13 ...
4 years, 5 months ago (2016-07-13 21:13:44 UTC) #36
ulan
On 2016/07/13 21:13:44, bokan wrote: > On 2016/07/13 21:09:11, ulan wrote: > > On 2016/07/13 ...
4 years, 5 months ago (2016-07-14 11:53:24 UTC) #38
petrcermak
LGTM if Ned is happy (please have a look at my comment regarding creating gesture_common.py). ...
4 years, 5 months ago (2016-07-14 13:04:31 UTC) #39
bokan
The approach looks fine to me. I have a few notes and questions though. https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js ...
4 years, 5 months ago (2016-07-14 14:11:19 UTC) #40
nednguyen
https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js File telemetry/telemetry/internal/actions/gesture_common.js (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js#newcode8 telemetry/telemetry/internal/actions/gesture_common.js:8: (function() { Fan we add some house keeping bit ...
4 years, 5 months ago (2016-07-14 14:28:03 UTC) #41
nednguyen
https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js File telemetry/telemetry/internal/actions/gesture_common.js (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js#newcode8 telemetry/telemetry/internal/actions/gesture_common.js:8: (function() { On 2016/07/14 14:28:02, nednguyen wrote: > Fan ...
4 years, 5 months ago (2016-07-14 14:33:19 UTC) #42
petrcermak
https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js File telemetry/telemetry/internal/actions/gesture_common.js (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js#newcode8 telemetry/telemetry/internal/actions/gesture_common.js:8: (function() { On 2016/07/14 14:33:19, nednguyen wrote: > On ...
4 years, 5 months ago (2016-07-14 15:00:39 UTC) #43
ulan
PTAL https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js File telemetry/telemetry/internal/actions/gesture_common.js (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/gesture_common.js#newcode8 telemetry/telemetry/internal/actions/gesture_common.js:8: (function() { On 2016/07/14 15:00:39, petrcermak wrote: > ...
4 years, 5 months ago (2016-07-14 17:20:41 UTC) #44
nednguyen
lgtm https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/key_event_unittest.py File telemetry/telemetry/internal/actions/key_event_unittest.py (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/key_event_unittest.py#newcode31 telemetry/telemetry/internal/actions/key_event_unittest.py:31: # Import __GestureCommon_GetViewportHeight. On 2016/07/14 17:20:41, ulan wrote: ...
4 years, 5 months ago (2016-07-14 19:18:27 UTC) #45
bokan
Thanks, just a few more followups https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py File telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py#newcode83 telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py:83: self._tab.action_runner.PinchPage(scale_factor=0.1) On 2016/07/14 ...
4 years, 5 months ago (2016-07-14 21:08:58 UTC) #46
ulan
PTAL. I added the missing utils.py and addressed comments https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py File telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py#newcode83 telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py:83: ...
4 years, 5 months ago (2016-07-15 09:42:42 UTC) #47
bokan
lgtm, thanks. https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py File telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py (right): https://codereview.chromium.org/2138883002/diff/260001/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py#newcode83 telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py:83: self._tab.action_runner.PinchPage(scale_factor=0.1) On 2016/07/15 09:42:41, ulan wrote: > ...
4 years, 5 months ago (2016-07-15 14:19:24 UTC) #48
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/2138883002/300001
4 years, 5 months ago (2016-07-18 11:31:45 UTC) #51
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 11:57:26 UTC) #53
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/external/github.com/catapult-project/catapu...

Powered by Google App Engine
This is Rietveld 408576698