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

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: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/motion_event_android.h » ('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 6cd82b847daa7c131ad4e44d56ab75096413c637..2369f6feafc577b4ced65890cdb50ce580dbba4d 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -366,8 +366,7 @@ void ContentViewCoreImpl::RenderViewReady() {
}
void ContentViewCoreImpl::OnGestureEvent(const ui::GestureEventData& gesture) {
- SendGestureEvent(
- CreateWebGestureEventFromGestureEventData(gesture, 1.f / dpi_scale()));
+ SendGestureEvent(CreateWebGestureEventFromGestureEventData(gesture));
}
RenderWidgetHostViewAndroid*
@@ -1056,7 +1055,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,
@@ -1143,8 +1143,7 @@ bool ContentViewCoreImpl::OnMotionEvent(const ui::MotionEvent& event) {
return true;
}
- rwhv->SendTouchEvent(
- CreateWebTouchEventFromMotionEvent(event, 1.f / dpi_scale()));
+ rwhv->SendTouchEvent(CreateWebTouchEventFromMotionEvent(event));
return true;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/motion_event_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698