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

Commit d22bf4b0 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Initial support for keyboard navigation"

parents e83b83fe 9b24dad7
Loading
Loading
Loading
Loading
+29 −27
Original line number Diff line number Diff line
@@ -5592,7 +5592,7 @@ public class WebView extends AbsoluteLayout
            return false;
        }

        if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
        if (isEnterActionKey(keyCode)) {
            switchOutDrawHistory();
            boolean wantsKeyEvents = nativeCursorNodePointer() == 0
                || nativeCursorWantsKeyEvents();
@@ -5741,6 +5741,7 @@ public class WebView extends AbsoluteLayout
                return true; // discard press if copy in progress
            }

            if (!sDisableNavcache) {
                // perform the single click
                Rect visibleRect = sendOurVisibleRect();
                // Note that sendOurVisibleRect calls viewToContent, so the
@@ -5770,6 +5771,7 @@ public class WebView extends AbsoluteLayout
                    return true;
                }
            }
        }

        // TODO: should we pass all the keys to DOM or check the meta tag
        if (nativeCursorWantsKeyEvents() || true) {
+9 −4
Original line number Diff line number Diff line
@@ -333,6 +333,15 @@ public final class WebViewCore {
                nodePointer, 0).sendToTarget();
    }

    /**
     * Called by JNI when the focus node changed.
     */
    private void focusNodeChanged(WebKitHitTest hitTest) {
        if (mWebView == null) return;
        mWebView.mPrivateHandler.obtainMessage(WebView.HIT_TEST_RESULT, hitTest)
                .sendToTarget();
    }

    /**
     * Called by JNI.  Open a file chooser to upload a file.
     * @param acceptType The value of the 'accept' attribute of the
@@ -615,7 +624,6 @@ public final class WebViewCore {
            int x, int y);
    private native String nativeRetrieveImageSource(int nativeClass,
            int x, int y);
    private native void nativeStopPaintingCaret(int nativeClass);
    private native void nativeTouchUp(int nativeClass,
            int touchGeneration, int framePtr, int nodePtr, int x, int y);

@@ -1539,9 +1547,6 @@ public final class WebViewCore {
                            nativeMoveMouseIfLatest(mNativeClass,
                                    cData.mMoveGeneration,
                                    cData.mFrame, cData.mX, cData.mY);
                            if (msg.arg1 == 1) {
                                nativeStopPaintingCaret(mNativeClass);
                            }
                            break;

                        case REQUEST_CURSOR_HREF: {