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

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

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nasty bug fix Created 6 years, 2 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/gesture_text_selector_unittest.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 54cd7a0bf05e44dc7b87e0a5504394cb12ec3318..cdc2146619310333341c4e936ae59e3835d78adb 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -866,6 +866,20 @@ jboolean ContentViewCoreImpl::OnTouchEvent(JNIEnv* env,
if (!rwhv)
return false;
+ MotionEventAndroid::Pointer pointer0(pointer_id_0,
+ pos_x_0,
+ pos_y_0,
+ touch_major_0,
+ touch_minor_0,
+ orientation_0,
+ android_tool_type_0);
+ MotionEventAndroid::Pointer pointer1(pointer_id_1,
+ pos_x_1,
+ pos_y_1,
+ touch_major_1,
+ touch_minor_1,
+ orientation_1,
+ android_tool_type_1);
MotionEventAndroid event(1.f / dpi_scale(),
env,
motion_event,
@@ -874,24 +888,12 @@ jboolean ContentViewCoreImpl::OnTouchEvent(JNIEnv* env,
pointer_count,
history_size,
action_index,
- pos_x_0,
- pos_y_0,
- pos_x_1,
- pos_y_1,
- pointer_id_0,
- pointer_id_1,
- touch_major_0,
- touch_major_1,
- touch_minor_0,
- touch_minor_1,
- orientation_0,
- orientation_1,
- raw_pos_x,
- raw_pos_y,
- android_tool_type_0,
- android_tool_type_1,
android_button_state,
- android_meta_state);
+ android_meta_state,
+ raw_pos_x - pos_x_0,
+ raw_pos_y - pos_y_0,
+ pointer0,
+ pointer1);
return is_touch_handle_event ? rwhv->OnTouchHandleEvent(event)
: rwhv->OnTouchEvent(event);
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_text_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698