Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f9ff7e7 authored by Cary Clark's avatar Cary Clark
Browse files

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)
parent f0885c77
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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);
+2 −3
Original line number Diff line number Diff line
@@ -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;