am 47fabbfc: Pass a message to move the focus when user hits "Next".
Merge commit '47fabbfcbf99e5e3b73a6ee09059c77932ef1b7b' into eclair-mr2-plus-aosp * commit '47fabbfcbf99e5e3b73a6ee09059c77932ef1b7b': Pass a message to move the focus when user hits "Next".
This commit is contained in:
@@ -325,9 +325,6 @@ import java.util.ArrayList;
|
|||||||
mWebView.setFocusControllerInactive();
|
mWebView.setFocusControllerInactive();
|
||||||
mWebView.nativeMoveCursorToNextTextInput();
|
mWebView.nativeMoveCursorToNextTextInput();
|
||||||
mOkayForFocusNotToMatch = true;
|
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
|
// Preemptively rebuild the WebTextView, so that the action will
|
||||||
// be set properly.
|
// be set properly.
|
||||||
mWebView.rebuildWebTextView();
|
mWebView.rebuildWebTextView();
|
||||||
|
|||||||
@@ -5695,6 +5695,12 @@ public class WebView extends AbsoluteLayout
|
|||||||
new InvokeListBox(array, enabledArray, selection));
|
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
|
// called by JNI
|
||||||
private void sendMoveMouse(int frame, int node, int x, int y) {
|
private void sendMoveMouse(int frame, int node, int x, int y) {
|
||||||
mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE,
|
mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE,
|
||||||
|
|||||||
@@ -503,6 +503,7 @@ final class WebViewCore {
|
|||||||
|
|
||||||
private native void nativeSaveDocumentState(int frame);
|
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 nativeMoveMouse(int framePtr, int x, int y);
|
||||||
|
|
||||||
private native void nativeMoveMouseIfLatest(int moveGeneration,
|
private native void nativeMoveMouseIfLatest(int moveGeneration,
|
||||||
@@ -661,11 +662,13 @@ final class WebViewCore {
|
|||||||
CursorData() {}
|
CursorData() {}
|
||||||
CursorData(int frame, int node, int x, int y) {
|
CursorData(int frame, int node, int x, int y) {
|
||||||
mFrame = frame;
|
mFrame = frame;
|
||||||
|
mNode = node;
|
||||||
mX = x;
|
mX = x;
|
||||||
mY = y;
|
mY = y;
|
||||||
}
|
}
|
||||||
int mMoveGeneration;
|
int mMoveGeneration;
|
||||||
int mFrame;
|
int mFrame;
|
||||||
|
int mNode;
|
||||||
int mX;
|
int mX;
|
||||||
int mY;
|
int mY;
|
||||||
}
|
}
|
||||||
@@ -751,7 +754,7 @@ final class WebViewCore {
|
|||||||
"SINGLE_LISTBOX_CHOICE", // = 124;
|
"SINGLE_LISTBOX_CHOICE", // = 124;
|
||||||
"MESSAGE_RELAY", // = 125;
|
"MESSAGE_RELAY", // = 125;
|
||||||
"SET_BACKGROUND_COLOR", // = 126;
|
"SET_BACKGROUND_COLOR", // = 126;
|
||||||
"127", // = 127
|
"SET_MOVE_FOCUS", // = 127
|
||||||
"SAVE_DOCUMENT_STATE", // = 128;
|
"SAVE_DOCUMENT_STATE", // = 128;
|
||||||
"GET_SELECTION", // = 129;
|
"GET_SELECTION", // = 129;
|
||||||
"WEBKIT_DRAW", // = 130;
|
"WEBKIT_DRAW", // = 130;
|
||||||
@@ -802,6 +805,7 @@ final class WebViewCore {
|
|||||||
static final int SINGLE_LISTBOX_CHOICE = 124;
|
static final int SINGLE_LISTBOX_CHOICE = 124;
|
||||||
static final int MESSAGE_RELAY = 125;
|
static final int MESSAGE_RELAY = 125;
|
||||||
static final int SET_BACKGROUND_COLOR = 126;
|
static final int SET_BACKGROUND_COLOR = 126;
|
||||||
|
static final int SET_MOVE_FOCUS = 127;
|
||||||
static final int SAVE_DOCUMENT_STATE = 128;
|
static final int SAVE_DOCUMENT_STATE = 128;
|
||||||
static final int GET_SELECTION = 129;
|
static final int GET_SELECTION = 129;
|
||||||
static final int WEBKIT_DRAW = 130;
|
static final int WEBKIT_DRAW = 130;
|
||||||
@@ -1149,6 +1153,11 @@ final class WebViewCore {
|
|||||||
mBrowserFrame.documentAsText((Message) msg.obj);
|
mBrowserFrame.documentAsText((Message) msg.obj);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SET_MOVE_FOCUS:
|
||||||
|
CursorData focusData = (CursorData) msg.obj;
|
||||||
|
nativeMoveFocus(focusData.mFrame, focusData.mNode);
|
||||||
|
break;
|
||||||
|
|
||||||
case SET_MOVE_MOUSE:
|
case SET_MOVE_MOUSE:
|
||||||
CursorData cursorData = (CursorData) msg.obj;
|
CursorData cursorData = (CursorData) msg.obj;
|
||||||
nativeMoveMouse(cursorData.mFrame,
|
nativeMoveMouse(cursorData.mFrame,
|
||||||
|
|||||||
Reference in New Issue
Block a user