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

Commit 47fabbfc authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Pass a message to move the focus when user hits "Next".

Directly move the focus rather than passing a click.

Fixes http://b/issue?id=2292683

Requires a change to external/webkit
parent 981ccfbb
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -325,9 +325,6 @@ import java.util.ArrayList;
            mWebView.setFocusControllerInactive();
            mWebView.nativeMoveCursorToNextTextInput();
            mOkayForFocusNotToMatch = true;
            // Pass the click to set the focus to the textfield which will now
            // have the cursor.
            mWebView.centerKeyPressOnTextField();
            // Preemptively rebuild the WebTextView, so that the action will
            // be set properly.
            mWebView.rebuildWebTextView();
+6 −0
Original line number Diff line number Diff line
@@ -5695,6 +5695,12 @@ public class WebView extends AbsoluteLayout
                new InvokeListBox(array, enabledArray, selection));
    }

    // called by JNI
    private void sendMoveFocus(int frame, int node) {
        mWebViewCore.sendMessage(EventHub.SET_MOVE_FOCUS,
                new WebViewCore.CursorData(frame, node, 0, 0));
    }

    // called by JNI
    private void sendMoveMouse(int frame, int node, int x, int y) {
        mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE,
+10 −1
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@ final class WebViewCore {

    private native void nativeSaveDocumentState(int frame);

    private native void nativeMoveFocus(int framePtr, int nodePointer);
    private native void nativeMoveMouse(int framePtr, int x, int y);

    private native void nativeMoveMouseIfLatest(int moveGeneration,
@@ -661,11 +662,13 @@ final class WebViewCore {
        CursorData() {}
        CursorData(int frame, int node, int x, int y) {
            mFrame = frame;
            mNode = node;
            mX = x;
            mY = y;
        }
        int mMoveGeneration;
        int mFrame;
        int mNode;
        int mX;
        int mY;
    }
@@ -751,7 +754,7 @@ final class WebViewCore {
            "SINGLE_LISTBOX_CHOICE", // = 124;
            "MESSAGE_RELAY", // = 125;
            "SET_BACKGROUND_COLOR", // = 126;
            "127", // = 127
            "SET_MOVE_FOCUS", // = 127
            "SAVE_DOCUMENT_STATE", // = 128;
            "GET_SELECTION", // = 129;
            "WEBKIT_DRAW", // = 130;
@@ -802,6 +805,7 @@ final class WebViewCore {
        static final int SINGLE_LISTBOX_CHOICE = 124;
        static final int MESSAGE_RELAY = 125;
        static final int SET_BACKGROUND_COLOR = 126;
        static final int SET_MOVE_FOCUS = 127;
        static final int SAVE_DOCUMENT_STATE = 128;
        static final int GET_SELECTION = 129;
        static final int WEBKIT_DRAW = 130;
@@ -1149,6 +1153,11 @@ final class WebViewCore {
                            mBrowserFrame.documentAsText((Message) msg.obj);
                            break;

                        case SET_MOVE_FOCUS:
                            CursorData focusData = (CursorData) msg.obj;
                            nativeMoveFocus(focusData.mFrame, focusData.mNode);
                            break;

                        case SET_MOVE_MOUSE:
                            CursorData cursorData = (CursorData) msg.obj;
                            nativeMoveMouse(cursorData.mFrame,