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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 475633002: Pass TouchMajor to HitTestResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use const ref Created 6 years, 1 month 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 | « android_webview/common/render_view_messages.h ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 60b976ea868cdc190eeb8fcf0679514edf092a67..854865b8bb0262dba55dbfe8602be44b5bf4c2b8 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -2383,13 +2383,12 @@ public class AwContents implements SmartClipProvider {
mScrollOffsetManager.setProcessingTouchEvent(false);
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
- int actionIndex = event.getActionIndex();
-
// Note this will trigger IPC back to browser even if nothing is
// hit.
nativeRequestNewHitTestDataAt(mNativeAwContents,
- (int) Math.round(event.getX(actionIndex) / mDIPScale),
- (int) Math.round(event.getY(actionIndex) / mDIPScale));
+ event.getX() / (float) mDIPScale,
+ event.getY() / (float) mDIPScale,
+ event.getTouchMajor() / (float) mDIPScale);
}
if (mOverScrollGlow != null) {
@@ -2603,7 +2602,8 @@ public class AwContents implements SmartClipProvider {
private native byte[] nativeGetCertificate(long nativeAwContents);
// Coordinates in desity independent pixels.
- private native void nativeRequestNewHitTestDataAt(long nativeAwContents, int x, int y);
+ private native void nativeRequestNewHitTestDataAt(long nativeAwContents, float x, float y,
+ float touchMajor);
private native void nativeUpdateLastHitTestData(long nativeAwContents);
private native void nativeOnSizeChanged(long nativeAwContents, int w, int h, int ow, int oh);
« no previous file with comments | « android_webview/common/render_view_messages.h ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698