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

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: undo pinch refactoring; get device scale factor from gfx::Screen 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..850c8e687ef1804649254d662c2b55ab93234058 100644
--- a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.cc
@@ -54,6 +54,10 @@ void SyntheticSmoothScrollGesture::ForwardTouchInputEvents(
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;

Powered by Google App Engine
This is Rietveld 408576698