DO NOT MERGE. Send a message when the picture changes and find is up to search again.
Fixes http://b/issue?id=2222706 Requires a change in external/webkit. Not merging because the change in webkit should be altered slightly.
This commit is contained in:
@@ -462,6 +462,7 @@ public class WebView extends AbsoluteLayout
|
||||
static final int UPDATE_TEXT_ENTRY_MSG_ID = 15;
|
||||
static final int WEBCORE_INITIALIZED_MSG_ID = 16;
|
||||
static final int UPDATE_TEXTFIELD_TEXT_MSG_ID = 17;
|
||||
static final int FIND_AGAIN = 18;
|
||||
static final int MOVE_OUT_OF_PLUGIN = 19;
|
||||
static final int CLEAR_TEXT_ENTRY = 20;
|
||||
static final int UPDATE_TEXT_SELECTION_MSG_ID = 21;
|
||||
@@ -491,7 +492,7 @@ public class WebView extends AbsoluteLayout
|
||||
"UPDATE_TEXT_ENTRY_MSG_ID", // = 15;
|
||||
"WEBCORE_INITIALIZED_MSG_ID", // = 16;
|
||||
"UPDATE_TEXTFIELD_TEXT_MSG_ID", // = 17;
|
||||
"18", // = 18;
|
||||
"FIND_AGAIN", // = 18;
|
||||
"MOVE_OUT_OF_PLUGIN", // = 19;
|
||||
"CLEAR_TEXT_ENTRY", // = 20;
|
||||
"UPDATE_TEXT_SELECTION_MSG_ID", // = 21;
|
||||
@@ -2362,6 +2363,7 @@ public class WebView extends AbsoluteLayout
|
||||
}
|
||||
int result = nativeFindAll(find.toLowerCase(), find.toUpperCase());
|
||||
invalidate();
|
||||
mLastFind = find;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2369,6 +2371,9 @@ public class WebView extends AbsoluteLayout
|
||||
// or not we draw the highlights for matches.
|
||||
private boolean mFindIsUp;
|
||||
private int mFindHeight;
|
||||
// Keep track of the last string sent, so we can search again after an
|
||||
// orientation change or the dismissal of the soft keyboard.
|
||||
private String mLastFind;
|
||||
|
||||
/**
|
||||
* Return the first substring consisting of the address of a physical
|
||||
@@ -5261,6 +5266,13 @@ public class WebView extends AbsoluteLayout
|
||||
}
|
||||
break;
|
||||
|
||||
case FIND_AGAIN:
|
||||
// Ignore if find has been dismissed.
|
||||
if (mFindIsUp) {
|
||||
findAll(mLastFind);
|
||||
}
|
||||
break;
|
||||
|
||||
case DRAG_HELD_MOTIONLESS:
|
||||
mHeldMotionless = MOTIONLESS_TRUE;
|
||||
invalidate();
|
||||
|
||||
@@ -2115,6 +2115,13 @@ final class WebViewCore {
|
||||
WebView.CLEAR_TEXT_ENTRY).sendToTarget();
|
||||
}
|
||||
|
||||
// called by JNI
|
||||
private void sendFindAgain() {
|
||||
if (mWebView == null) return;
|
||||
Message.obtain(mWebView.mPrivateHandler,
|
||||
WebView.FIND_AGAIN).sendToTarget();
|
||||
}
|
||||
|
||||
private native void nativeUpdateFrameCacheIfLoading();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user