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

Issue 23452037: Do not scale ScrollEvent by device scale factor (Closed)

Created:
7 years, 3 months ago by Shecky Lin
Modified:
7 years, 3 months ago
Reviewers:
DaveMoore, oshima, sadrul, adlr
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Do not scale ScrollEvent by device scale factor We used to scale scroll events in event_transformation_handler because we want to mimic the behaviour of the CrOS X patch which scales pointer motions w.r.t. the screen resolution. See the patch here https://chromium-review.googlesource.com/#/c/45522/. The idea is actually wrong because Aura Views use DIPs instead of pixels as what X server does. The scaling would make scroll events to have 2x higher speed on Pixel as compared to normal resolution devices. This CL fixes the problem so that scroll events will have identical sensitivity on all devices regardless of the screen resolution. Note that the sensitivity would still be slightly different due to the sllightly different DIP resolution on each device. Contributed by sheckylin@chromium.org BUG=288211 TEST=Tested on Pixel and non-Pixel devices. Make sure: 1. Scrolling on webpages with touchpads goes through roughly the same amount of page if the scrolling distance and speed is the same. 2. 2f back/forward gesture should require roughly equal distance of scrolling on the touchpad at the same speed to trigger. 3. 3f tab-switching should go through roughly the same ratio of tab counts for the equal distance of scrolling on the touchpad at the same speed. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224341

Patch Set 1 #

Total comments: 5

Patch Set 2 : Trimmed comments and fix the code #

Total comments: 2

Patch Set 3 : Update the comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -8 lines) Patch
M ash/display/event_transformation_handler.cc View 1 2 1 chunk +5 lines, -8 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Shecky Lin
Sadrul/Dave: This is to make sure scroll events to have identical sensitivity on all devices. ...
7 years, 3 months ago (2013-09-18 08:01:59 UTC) #1
sadrul
https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc File ash/display/event_transformation_handler.cc (right): https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc#newcode61 ash/display/event_transformation_handler.cc:61: // gesture and 3f tab switching would have equal ...
7 years, 3 months ago (2013-09-18 15:36:40 UTC) #2
DaveMoore
On 2013/09/18 15:36:40, sadrul wrote: > https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc > File ash/display/event_transformation_handler.cc (right): > > https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc#newcode61 > ...
7 years, 3 months ago (2013-09-18 15:45:09 UTC) #3
oshima
https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc File ash/display/event_transformation_handler.cc (right): https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc#newcode61 ash/display/event_transformation_handler.cc:61: // gesture and 3f tab switching would have equal ...
7 years, 3 months ago (2013-09-18 16:26:10 UTC) #4
Shecky Lin
Thanks guys! I have addressed your comments. Let's get this in. https://codereview.chromium.org/23452037/diff/1/ash/display/event_transformation_handler.cc File ash/display/event_transformation_handler.cc (right): ...
7 years, 3 months ago (2013-09-20 04:44:10 UTC) #5
sadrul
LGTM with the comment updated https://codereview.chromium.org/23452037/diff/8001/ash/display/event_transformation_handler.cc File ash/display/event_transformation_handler.cc (right): https://codereview.chromium.org/23452037/diff/8001/ash/display/event_transformation_handler.cc#newcode45 ash/display/event_transformation_handler.cc:45: // in DIP. Remove ...
7 years, 3 months ago (2013-09-20 04:48:52 UTC) #6
oshima
lgtm once you addressed sadrul comment.
7 years, 3 months ago (2013-09-20 04:49:55 UTC) #7
Shecky Lin
Great thanks for light-speed response! https://codereview.chromium.org/23452037/diff/8001/ash/display/event_transformation_handler.cc File ash/display/event_transformation_handler.cc (right): https://codereview.chromium.org/23452037/diff/8001/ash/display/event_transformation_handler.cc#newcode45 ash/display/event_transformation_handler.cc:45: // in DIP. On ...
7 years, 3 months ago (2013-09-20 05:02:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheckylin@chromium.org/23452037/9002
7 years, 3 months ago (2013-09-20 05:03:20 UTC) #9
commit-bot: I haz the power
7 years, 3 months ago (2013-09-20 08:58:09 UTC) #10
Message was sent while issue was closed.
Change committed as 224341

Powered by Google App Engine
This is Rietveld 408576698