diff options
author | Andrei Popescu <andreip@google.com> | 2009-08-19 18:23:07 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-08-19 18:23:07 +0100 |
commit | cabf1bfc240bac8f24ff95e3bcc9d2d01d3b8a37 (patch) | |
tree | b87e7a4fafac15d2f51fee7db2547be38db7cf9c /WebKit | |
parent | 72f4ed34e756eaa90b94b74b7a6f43ec33310822 (diff) | |
parent | 1a2d2faa29b8d2ca981ec4f1ccc5d48d24e638cc (diff) | |
download | external_webkit-cabf1bfc240bac8f24ff95e3bcc9d2d01d3b8a37.zip external_webkit-cabf1bfc240bac8f24ff95e3bcc9d2d01d3b8a37.tar.gz external_webkit-cabf1bfc240bac8f24ff95e3bcc9d2d01d3b8a37.tar.bz2 |
Merge commit 'goog/master' into merge
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 12 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 3ede30a..670b64a 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -168,6 +168,7 @@ struct WebViewCore::JavaGlue { jmethodID m_jsUnload; jmethodID m_jsInterrupt; jmethodID m_didFirstLayout; + jmethodID m_updateViewport; jmethodID m_sendNotifyProgressFinished; jmethodID m_sendViewInvalidate; jmethodID m_updateTextfield; @@ -242,6 +243,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m m_javaGlue->m_jsUnload = GetJMethod(env, clazz, "jsUnload", "(Ljava/lang/String;Ljava/lang/String;)Z"); m_javaGlue->m_jsInterrupt = GetJMethod(env, clazz, "jsInterrupt", "()Z"); m_javaGlue->m_didFirstLayout = GetJMethod(env, clazz, "didFirstLayout", "(Z)V"); + m_javaGlue->m_updateViewport = GetJMethod(env, clazz, "updateViewport", "()V"); m_javaGlue->m_sendNotifyProgressFinished = GetJMethod(env, clazz, "sendNotifyProgressFinished", "()V"); m_javaGlue->m_sendViewInvalidate = GetJMethod(env, clazz, "sendViewInvalidate", "(IIII)V"); m_javaGlue->m_updateTextfield = GetJMethod(env, clazz, "updateTextfield", "(IZLjava/lang/String;I)V"); @@ -839,6 +841,16 @@ void WebViewCore::didFirstLayout() m_history.setDidFirstLayout(true); } +void WebViewCore::updateViewport() +{ + DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); + LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + + JNIEnv* env = JSC::Bindings::getJNIEnv(); + env->CallVoidMethod(m_javaGlue->object(env).get(), m_javaGlue->m_updateViewport); + checkException(env); +} + void WebViewCore::restoreScale(int scale) { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 1408cb7..97018f0 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -152,6 +152,11 @@ namespace android { void didFirstLayout(); /** + * Notify the view to update the viewport. + */ + void updateViewport(); + + /** * Notify the view to restore the screen width, which in turn restores * the scale. */ |