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

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 hitTestResultAt in RenderViewImpl::NodeContainsPoint 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
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 cb996fa2002677f431d198bf7989e9a65589d556..6e608df52e0cdedf0fc9753c90c48b4de7edcd58 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -2345,13 +2345,12 @@ public class AwContents {
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) {
@@ -2565,7 +2564,8 @@ public class AwContents {
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);

Powered by Google App Engine
This is Rietveld 408576698