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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 170993003: [Android] Use DIP coordinates for GestureFlingStart events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo unnecessary changes Created 6 years, 10 months 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
« no previous file with comments | « no previous file | webkit/child/fling_animator_impl_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 8d023829d8a25c2cba7e4a73c1c2436b9253f6d4..382db082ec38eaec66f344b737c010195ad0ca3a 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1182,10 +1182,8 @@ void ContentViewCoreImpl::FlingStart(JNIEnv* env, jobject obj, jlong time_ms,
WebGestureEvent event = MakeGestureEvent(
WebInputEvent::GestureFlingStart, time_ms, x, y);
- // Velocity should not be scaled by DIP since that interacts poorly with the
- // deceleration constants. The DIP scaling is done on the renderer.
- event.data.flingStart.velocityX = vx;
- event.data.flingStart.velocityY = vy;
+ event.data.flingStart.velocityX = vx / GetDpiScale();
+ event.data.flingStart.velocityY = vy / GetDpiScale();
SendGestureEvent(event);
}
« no previous file with comments | « no previous file | webkit/child/fling_animator_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698