summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-04-14 16:27:09 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-04-14 16:27:09 -0700
commit34a423ba5b431f032c09b5a6702b2cd3944bda3b (patch)
treece3174aa567eed2355c4ee18ac36d0df361ef0e3 /WebKit/android
parent13aa9bd5f2bbe6e503e6789ed9fc331fe106b5ea (diff)
parent22804c073ffc06fd1fc520d1afbad71e353e488d (diff)
downloadexternal_webkit-34a423ba5b431f032c09b5a6702b2cd3944bda3b.zip
external_webkit-34a423ba5b431f032c09b5a6702b2cd3944bda3b.tar.gz
external_webkit-34a423ba5b431f032c09b5a6702b2cd3944bda3b.tar.bz2
am 22804c07: Pass scroll mode to Java so that we can handle overflow on html and body correctly.
Merge commit '22804c073ffc06fd1fc520d1afbad71e353e488d' into froyo-plus-aosp * commit '22804c073ffc06fd1fc520d1afbad71e353e488d': Pass scroll mode to Java so that we can handle
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp11
-rw-r--r--WebKit/android/jni/WebViewCore.h5
2 files changed, 16 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
//----------------------------------------------------------------------
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index 8c885e6..056dba1 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
//