Remove obsolete notion of invalid node.
In the old navigation model, we set focus to a node, and checked to see
if that node was still valid (could have changed since we built the
navigation cache). Then we sent a message back to the UI thread to
tell it to draw the ring differently. In the new model, we are essentially
moving a mouse, so we do not concern ourselves with whether the node is
valid. Removed all the code for passing the message to the UI thread
and calling into native. Needs a change to external/webkit to work
properly.
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index c562831..200fa5a 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -448,7 +448,6 @@
static final int UPDATE_TEXTFIELD_TEXT_MSG_ID = 17;
static final int DID_FIRST_LAYOUT_MSG_ID = 18;
- static final int MARK_NODE_INVALID_ID = 21;
static final int UPDATE_CLIPBOARD = 22;
static final int LONG_PRESS_CENTER = 23;
static final int PREVENT_TOUCH_ID = 24;
@@ -477,7 +476,7 @@
"DID_FIRST_LAYOUT_MSG_ID", // = 18;
"19",
"20",
- "MARK_NODE_INVALID_ID", // = 21;
+ "21", // = 21;
"UPDATE_CLIPBOARD", // = 22;
"LONG_PRESS_CENTER", // = 23;
"PREVENT_TOUCH_ID", // = 24;
@@ -3446,7 +3445,9 @@
* FocusController is "active" so that it will draw the blinking cursor.
*/
private void setFocusControllerActive(boolean active) {
- if (mWebViewCore == null) return;
+ // Do not need to also check whether mWebViewCore is null, because
+ // mNativeClass is only set if mWebViewCore is non null
+ if (mNativeClass == 0) return;
active &= nativeCursorMatchesFocus() || !nativeHasFocusNode()
|| !nativeCursorWantsKeyEvents();
mWebViewCore.sendMessage(EventHub.SET_ACTIVE, active ? 1 : 0, 0);
@@ -4764,9 +4765,6 @@
}
setNewZoomScale(scale, false);
break;
- case MARK_NODE_INVALID_ID:
- nativeMarkNodeInvalid(msg.arg1);
- break;
case UPDATE_TEXT_ENTRY_MSG_ID:
// this is sent after finishing resize in WebViewCore. Make
// sure the text edit box is still on the screen.
@@ -5274,7 +5272,6 @@
private native boolean nativeHasFocusNode();
private native String nativeImageURI(int x, int y);
private native void nativeInstrumentReport();
- private native void nativeMarkNodeInvalid(int node);
// return true if the page has been scrolled
private native boolean nativeMotionUp(int x, int y, int slop);
// returns false if it handled the key
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index b0747f5..797250e 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -1543,14 +1543,6 @@
}
// called by JNI
- private void sendMarkNodeInvalid(int node) {
- if (mWebView != null) {
- Message.obtain(mWebView.mPrivateHandler,
- WebView.MARK_NODE_INVALID_ID, node, 0).sendToTarget();
- }
- }
-
- // called by JNI
private void sendNotifyProgressFinished() {
sendUpdateTextEntry();
// as CacheManager can behave based on database transaction, we need to