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

Commit f90b1261 authored by Leon Scroggins's avatar Leon Scroggins
Browse files

When clicking on a WebTextView, always call nativeMotionUp.

We were previously calling nativeTextInputMotionUp, which was
intended to be faster than nativeMotionUp, which does more work.
However, as discussed in http://b/issue?id=2257787 , I think we
should simply call nativeMotionUp, which does everything the old
method did, while also correcting things if necessary.  This fixes
the second problem listed in http://b/issue?id=2266756 , since
nativeMotionUp will recognize that the <select> element should
take the click.

Since I have removed a native method, this requires a change to
external/webkit.
parent a2d259aa
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -4787,7 +4787,7 @@ public class WebView extends AbsoluteLayout
    }

    /**
     * Do a touch up from a WebTextView.  This will be handled by webkit to
     * Due a touch up from a WebTextView.  This will be handled by webkit to
     * change the selection.
     * @param event MotionEvent in the WebTextView's coordinates.
     */
@@ -4797,11 +4797,8 @@ public class WebView extends AbsoluteLayout
        }
        int x = viewToContentX((int) event.getX() + mWebTextView.getLeft());
        int y = viewToContentY((int) event.getY() + mWebTextView.getTop());
        if (nativeFocusNodePointer() != nativeCursorNodePointer()) {
        nativeMotionUp(x, y, mNavSlop);
    }
        nativeTextInputMotionUp(x, y);
    }

    /**
     * Called when pressing the center key or trackball on a textfield.
@@ -5941,12 +5938,6 @@ public class WebView extends AbsoluteLayout
    private native void     nativeSetHeightCanMeasure(boolean measure);
    // Returns a value corresponding to CachedFrame::ImeAction
    /* package */ native int  nativeTextFieldAction();
    /**
     * Perform a click on a currently focused text input.  Since it is already
     * focused, there is no need to go through the nativeMotionUp code, which
     * may change the Cursor.
     */
    private native void     nativeTextInputMotionUp(int x, int y);
    private native int      nativeTextGeneration();
    // Never call this version except by updateCachedTextfield(String) -
    // we always want to pass in our generation number.