diff options
author | Leon Scroggins <scroggo@google.com> | 2009-10-29 09:47:34 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-10-29 12:54:10 -0400 |
commit | 2cc0048c05c4e957c2163d2306fba008ececc332 (patch) | |
tree | dee626b26b35bf8a1231570fd239815b7605c109 /WebKit | |
parent | 6613ce04263a3260e412ab09fedcfb41e523e28d (diff) | |
download | external_webkit-2cc0048c05c4e957c2163d2306fba008ececc332.zip external_webkit-2cc0048c05c4e957c2163d2306fba008ececc332.tar.gz external_webkit-2cc0048c05c4e957c2163d2306fba008ececc332.tar.bz2 |
DO NOT MERGE. Send a message when the page changes and find is up to search again.
Fixes http://b/issue?id=2222706
Requires a change in frameworks/base.
Not merging because we changed the way we call JNI functions.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index f958477..1588967 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -190,6 +190,7 @@ struct WebViewCore::JavaGlue { jmethodID m_createSurface; jmethodID m_updateSurface; jmethodID m_destroySurface; + jmethodID m_sendFindAgain; AutoJObject object(JNIEnv* env) { return getRealObject(env, m_obj); } @@ -267,6 +268,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m m_javaGlue->m_createSurface = GetJMethod(env, clazz, "createSurface", "(Ljava/lang/String;Ljava/lang/String;IIIII)Landroid/webkit/ViewManager$ChildView;"); m_javaGlue->m_updateSurface = GetJMethod(env, clazz, "updateSurface", "(Landroid/webkit/ViewManager$ChildView;IIII)V"); m_javaGlue->m_destroySurface = GetJMethod(env, clazz, "destroySurface", "(Landroid/webkit/ViewManager$ChildView;)V"); + m_javaGlue->m_sendFindAgain = GetJMethod(env, clazz, "sendFindAgain", "()V"); env->SetIntField(javaWebViewCore, gWebViewCoreFields.m_nativeClass, (jint)this); @@ -578,6 +580,16 @@ void WebViewCore::recordPictureSet(PictureSet* content) m_domtree_version = latestVersion; DBG_NAV_LOG("call updateFrameCache"); updateFrameCache(); + if (m_findIsUp) { + JNIEnv* env = JSC::Bindings::getJNIEnv(); + AutoJObject obj = m_javaGlue->object(env); + // if it is called during DESTROY is handled, the real object of WebViewCore + // can be gone. Check before using it. + if (!obj.get()) + return; + env->CallVoidMethod(obj.get(), m_javaGlue->m_sendFindAgain); + checkException(env); + } } void WebViewCore::updateButtonList(WTF::Vector<Container>* buttons) |