diff options
| author | Grace Kloba <klobag@google.com> | 2010-04-13 22:45:39 -0700 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2010-04-13 22:45:39 -0700 |
| commit | 22804c073ffc06fd1fc520d1afbad71e353e488d (patch) | |
| tree | 8202faf9c54ed33b608e6a690cd833d1f61e8d10 /WebKit/android/jni/WebViewCore.cpp | |
| parent | ac90fdd70d8a2f6051fdc959dac8edf5819f38bd (diff) | |
| download | external_webkit-22804c073ffc06fd1fc520d1afbad71e353e488d.zip external_webkit-22804c073ffc06fd1fc520d1afbad71e353e488d.tar.gz external_webkit-22804c073ffc06fd1fc520d1afbad71e353e488d.tar.bz2 | |
Pass scroll mode to Java so that we can handle
overflow on html and body correctly.
Fix http://b/issue?id=2512549
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index eafd91c..70e96cd 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); @@ -2531,6 +2533,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 //---------------------------------------------------------------------- |
