diff options
author | Grace Kloba <klobag@google.com> | 2010-04-15 12:33:51 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-15 12:33:51 -0700 |
commit | 3edc12358398336ddce4ca6ee74226a168792946 (patch) | |
tree | b1ab4801141644c596667057a1eefd7d2125ab7a /WebKit | |
parent | 40a329169016c529dd7ff6bf403a00f1307f9eb6 (diff) | |
parent | 5c6e2c7832240d131e937bcce24f904854159ab8 (diff) | |
download | external_webkit-3edc12358398336ddce4ca6ee74226a168792946.zip external_webkit-3edc12358398336ddce4ca6ee74226a168792946.tar.gz external_webkit-3edc12358398336ddce4ca6ee74226a168792946.tar.bz2 |
am 5c6e2c78: am 34a423ba: am 22804c07: Pass scroll mode to Java so that we can handle overflow on html and body correctly.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 11 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 5a0c471..14fd44e 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -252,6 +252,7 @@ struct WebViewCore::JavaGlue { jmethodID m_sendFindAgain; jmethodID m_showRect; jmethodID m_centerFitRect; + jmethodID m_setScrollbarModes; AutoJObject object(JNIEnv* env) { return getRealObject(env, m_obj); } @@ -342,6 +343,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m m_javaGlue->m_sendFindAgain = GetJMethod(env, clazz, "sendFindAgain", "()V"); m_javaGlue->m_showRect = GetJMethod(env, clazz, "showRect", "(IIIIIIFFFF)V"); m_javaGlue->m_centerFitRect = GetJMethod(env, clazz, "centerFitRect", "(IIII)V"); + m_javaGlue->m_setScrollbarModes = GetJMethod(env, clazz, "setScrollbarModes", "(II)V"); env->SetIntField(javaWebViewCore, gWebViewCoreFields.m_nativeClass, (jint)this); @@ -2523,6 +2525,15 @@ void WebViewCore::centerFitRect(int x, int y, int width, int height) checkException(env); } + +void WebViewCore::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode verticalMode) +{ + JNIEnv* env = JSC::Bindings::getJNIEnv(); + env->CallVoidMethod(m_javaGlue->object(env).get(), m_javaGlue->m_setScrollbarModes, + horizontalMode, verticalMode); + checkException(env); +} + //---------------------------------------------------------------------- // Native JNI methods //---------------------------------------------------------------------- diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 4a4b335..4ed17bf 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -249,6 +249,11 @@ namespace android { void addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID, int msgLevel); + /** + * Tell the Java side of the scrollbar mode + */ + void setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode verticalMode); + // // Followings support calls from Java to native WebCore // |