summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-04-13 22:45:39 -0700
committerGrace Kloba <klobag@google.com>2010-04-13 22:45:39 -0700
commit22804c073ffc06fd1fc520d1afbad71e353e488d (patch)
tree8202faf9c54ed33b608e6a690cd833d1f61e8d10 /WebCore/platform
parentac90fdd70d8a2f6051fdc959dac8edf5819f38bd (diff)
downloadexternal_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 'WebCore/platform')
-rw-r--r--WebCore/platform/ScrollView.cpp2
-rw-r--r--WebCore/platform/android/ScrollViewAndroid.cpp11
2 files changed, 11 insertions, 2 deletions
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 1e28651..69ecac2 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -985,11 +985,11 @@ void ScrollView::platformSetScrollbarsSuppressed(bool)
#if !PLATFORM(MAC) && !PLATFORM(WX)
+#if !PLATFORM(ANDROID)
void ScrollView::platformSetScrollbarModes()
{
}
-#if !PLATFORM(ANDROID)
void ScrollView::platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode& vertical) const
{
horizontal = ScrollbarAuto;
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index db20591..90a988d 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -73,9 +73,18 @@ void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt)
android::WebViewCore::getWebViewCore(this)->scrollTo(pt.x(), pt.y());
}
+void ScrollView::platformSetScrollbarModes()
+{
+ if (parent()) // no scrollbar for the subframes
+ return;
+ android::WebViewCore::getWebViewCore(this)->setScrollbarModes(m_horizontalScrollbarMode, m_verticalScrollbarMode);
+}
+
void ScrollView::platformScrollbarModes(ScrollbarMode& h, ScrollbarMode& v) const
{
- h = v = ScrollbarAlwaysOff;
+ // m_horizontalScrollbarMode and m_verticalScrollbarMode are set in ScrollView::setScrollbarModes()
+ h = m_horizontalScrollbarMode;
+ v = m_verticalScrollbarMode;
}
bool ScrollView::platformProhibitsScrolling()