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

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

Issue 220063002: [Android] Use DIP coordinates with MotionEventAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 6 years, 8 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
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 dc54296a142d6792de3defe8f253de598eed333a..2d028e804269d08428e6da4e2ffdb85f97911389 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -369,8 +369,7 @@ void ContentViewCoreImpl::RenderViewReady() {
}
void ContentViewCoreImpl::OnGestureEvent(const ui::GestureEventData& gesture) {
- SendGestureEvent(
- CreateWebGestureEventFromGestureEventData(gesture, 1.f / dpi_scale()));
+ SendGestureEvent(CreateWebGestureEventFromGestureEventData(gesture));
}
RenderWidgetHostViewAndroid*
@@ -1052,7 +1051,8 @@ jboolean ContentViewCoreImpl::OnTouchEvent(JNIEnv* env,
if (!rwhv)
return false;
- MotionEventAndroid event(env,
+ MotionEventAndroid event(1.f / dpi_scale(),
+ env,
motion_event,
time_ms,
android_action,
@@ -1139,8 +1139,7 @@ bool ContentViewCoreImpl::OnMotionEvent(const ui::MotionEvent& event) {
return true;
}
- rwhv->SendTouchEvent(
- CreateWebTouchEventFromMotionEvent(event, 1.f / dpi_scale()));
+ rwhv->SendTouchEvent(CreateWebTouchEventFromMotionEvent(event));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698