DescriptionMake touch-based synthetic gesture take touch slop into account.
Touchscreen devices typically have a 'touch slop', i.e. a certain distance a
pointer has to move before it is considered moving. The touch slop is subtracted
from the distance a pointer moves. So if the touch slop is 10 pixels and a
pointer moves by 100 pixels on the screen, the resulting move is registered as
having covered only 90 pixels.
This patch adds the 'GetTouchSlopInDips' to SyntheticGestureTargets. This value
is used by the gestures to increase the distances covered by touch pointers. For
example, to scroll 100 pixels with a touch slop of 10 pixels, the pointer will
cover 110 pixels.
Touch-based synthetic gestures are updated to take the touch slop into account.
BUG=313645
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238248
Patch Set 1 #Patch Set 2 : Fix touch slop direction. #Patch Set 3 : Re-upload #Patch Set 4 : Minor refactoring of pinch gesture. #
Total comments: 4
Patch Set 5 : undo pinch refactoring; get device scale factor from gfx::Screen #
Total comments: 8
Patch Set 6 : Nits #Patch Set 7 : Fix 0 distance case & add unit tests. #
Total comments: 6
Patch Set 8 : bulach's comments. #Patch Set 9 : Update comment. #Patch Set 10 : Remove unused variable. #Messages
Total messages: 14 (0 generated)
|