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

Commit a34a5ed9 authored by George Mount's avatar George Mount
Browse files

Support "prev" for IME input.

 Bug 6152403
 WebKit change: I09e5f63d41bb88a632f70b010e8ab4851bf90bab

Change-Id: I6d339d724616b9f156458dd4223d3b991191b13d
parent c4ffe77a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -548,10 +548,14 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            if (!initData.mIsSpellCheckEnabled) {
                inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
            }
            if (WebTextView.TEXT_AREA != type
                    && initData.mIsTextFieldNext) {
            if (WebTextView.TEXT_AREA != type) {
                if (initData.mIsTextFieldNext) {
                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_NEXT;
                }
                if (initData.mIsTextFieldPrev) {
                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS;
                }
            }
            switch (type) {
                case WebTextView.NORMAL_TEXT_FIELD:
                    imeOptions |= EditorInfo.IME_ACTION_GO;
+7 −4
Original line number Diff line number Diff line
@@ -954,14 +954,15 @@ public final class WebViewCore {
        public TextFieldInitData(int fieldPointer,
                String text, int type, boolean isSpellCheckEnabled,
                boolean autoComplete, boolean isTextFieldNext,
                String name, String label, int maxLength,
                Rect nodeBounds, int nodeLayerId) {
                boolean isTextFieldPrev, String name, String label,
                int maxLength, Rect nodeBounds, int nodeLayerId) {
            mFieldPointer = fieldPointer;
            mText = text;
            mType = type;
            mIsAutoCompleteEnabled = autoComplete;
            mIsSpellCheckEnabled = isSpellCheckEnabled;
            mIsTextFieldNext = isTextFieldNext;
            mIsTextFieldPrev = isTextFieldPrev;
            mName = name;
            mLabel = label;
            mMaxLength = maxLength;
@@ -973,6 +974,7 @@ public final class WebViewCore {
        int mType;
        boolean mIsSpellCheckEnabled;
        boolean mIsTextFieldNext;
        boolean mIsTextFieldPrev;
        boolean mIsAutoCompleteEnabled;
        String mName;
        String mLabel;
@@ -2798,7 +2800,7 @@ public final class WebViewCore {
    // called by JNI
    private void initEditField(int pointer, String text, int inputType,
            boolean isSpellCheckEnabled, boolean isAutoCompleteEnabled,
            boolean nextFieldIsText, String name,
            boolean nextFieldIsText, boolean prevFieldIsText, String name,
            String label, int start, int end, int selectionPtr, int maxLength,
            Rect nodeRect, int nodeLayer) {
        if (mWebView == null) {
@@ -2806,7 +2808,8 @@ public final class WebViewCore {
        }
        TextFieldInitData initData = new TextFieldInitData(pointer,
                text, inputType, isSpellCheckEnabled, isAutoCompleteEnabled,
                nextFieldIsText, name, label, maxLength, nodeRect, nodeLayer);
                nextFieldIsText, prevFieldIsText, name, label, maxLength,
                nodeRect, nodeLayer);
        Message.obtain(mWebView.mPrivateHandler,
                WebViewClassic.INIT_EDIT_FIELD, initData).sendToTarget();
        Message.obtain(mWebView.mPrivateHandler,