From 8f9ff7e77f73b2712f775245113ea53614485317 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Thu, 14 May 2009 10:09:26 -0400 Subject: [PATCH] remove isClick parameter in browser touch event handler isClick is always set to true by the callers, so remove it and simplify the code (http://b/issue?id=1666780; see also change in external/webkit) --- core/java/android/webkit/WebView.java | 9 ++++----- core/java/android/webkit/WebViewCore.java | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 424e151379d9d..5b67b74dc5ba5 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4404,7 +4404,7 @@ public class WebView extends AbsoluteLayout View v = mTextEntry; int x = viewToContent((v.getLeft() + v.getRight()) >> 1); int y = viewToContent((v.getTop() + v.getBottom()) >> 1); - nativeMotionUp(x, y, mNavSlop, true); + nativeMotionUp(x, y, mNavSlop); } } @@ -4416,7 +4416,7 @@ public class WebView extends AbsoluteLayout // mLastTouchX and mLastTouchY are the point in the current viewport int contentX = viewToContent((int) mLastTouchX + mScrollX); int contentY = viewToContent((int) mLastTouchY + mScrollY); - if (nativeMotionUp(contentX, contentY, mNavSlop, true)) { + if (nativeMotionUp(contentX, contentY, mNavSlop)) { if (mLogEvent) { Checkin.updateStats(mContext.getContentResolver(), Checkin.Stats.Tag.BROWSER_SNAP_CENTER, 1, 0.0); @@ -5172,13 +5172,12 @@ public class WebView extends AbsoluteLayout // called by JNI private void sendMotionUp(int touchGeneration, int buildGeneration, - int frame, int node, int x, int y, int size, boolean isClick, + int frame, int node, int x, int y, int size, boolean retry) { WebViewCore.TouchUpData touchUpData = new WebViewCore.TouchUpData(); touchUpData.mMoveGeneration = touchGeneration; touchUpData.mBuildGeneration = buildGeneration; touchUpData.mSize = size; - touchUpData.mIsClick = isClick; touchUpData.mRetry = retry; mFocusData.mFrame = touchUpData.mFrame = frame; mFocusData.mNode = touchUpData.mNode = node; @@ -5315,7 +5314,7 @@ public class WebView extends AbsoluteLayout private native void nativeInstrumentReport(); private native void nativeMarkNodeInvalid(int node); // return true if the page has been scrolled - private native boolean nativeMotionUp(int x, int y, int slop, boolean isClick); + private native boolean nativeMotionUp(int x, int y, int slop); // returns false if it handled the key private native boolean nativeMoveFocus(int keyCode, int count, boolean noScroll); diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index c1bab3ac78e34..1c832642fde91 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -384,7 +384,7 @@ final class WebViewCore { private native void nativeTouchUp(int touchGeneration, int buildGeneration, int framePtr, int nodePtr, int x, int y, - int size, boolean isClick, boolean retry); + int size, boolean retry); private native boolean nativeHandleTouchEvent(int action, int x, int y); @@ -540,7 +540,6 @@ final class WebViewCore { int mX; int mY; int mSize; - boolean mIsClick; boolean mRetry; } @@ -906,7 +905,7 @@ final class WebViewCore { touchUpData.mBuildGeneration, touchUpData.mFrame, touchUpData.mNode, touchUpData.mX, touchUpData.mY, - touchUpData.mSize, touchUpData.mIsClick, + touchUpData.mSize, touchUpData.mRetry); break;