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

Unified Diff: content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc

Issue 95153002: Make touch-based synthetic gesture take touch slop into account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused variable. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
diff --git a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc b/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
index 84d4a1812aa70690ae8d77c69f3dc7e190fd01a1..37a80b3f64447ff48134a71b056e7ee47eba8f8b 100644
--- a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
@@ -50,10 +50,14 @@ void SyntheticSmoothScrollGesture::ForwardTouchInputEvents(
switch (state_) {
case STARTED:
// Check for an early finish.
- if (HasScrolledEntireDistance()) {
+ if (params_.distance == 0) {
state_ = DONE;
break;
}
+ if (params_.distance > 0)
+ params_.distance += target->GetTouchSlopInDips();
+ else
+ params_.distance -= target->GetTouchSlopInDips();
touch_event_.PressPoint(params_.anchor.x(), current_y_);
ForwardTouchEvent(target);
state_ = MOVING;
« no previous file with comments | « content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h ('k') | content/common/android/view_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698