diff options
author | George Mount <mount@google.com> | 2011-10-24 15:45:31 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2011-11-09 15:36:04 -0800 |
commit | 5fd03af0d9f4f978332fa17a40cc9f782db2432c (patch) | |
tree | c9c5606be5afabdc43ddce1c93b9cfb4e536e4ef /Source/WebCore/platform/android | |
parent | c97291b2e7a966abf8dbad5cf2e0e8b033c3cd90 (diff) | |
download | external_webkit-5fd03af0d9f4f978332fa17a40cc9f782db2432c.zip external_webkit-5fd03af0d9f4f978332fa17a40cc9f782db2432c.tar.gz external_webkit-5fd03af0d9f4f978332fa17a40cc9f782db2432c.tar.bz2 |
DO NOT MERGE Offset scroll area by the scroll origin on Android
Bug 5268793
The scrolled area for WebView is 0,0 - maxX,maxY while
ScrollView can have any origin. On RTL pages, the origin
is negative when it can scroll. This scrolls the page
to the right when it detects an RTL page.
Cherry-picked from master CL: I6a91b97f
Framework CL: I2537b84a
Change-Id: I6a91b97f90f5ba4c323c56dda9d125108d9502c4
Diffstat (limited to 'Source/WebCore/platform/android')
-rw-r--r-- | Source/WebCore/platform/android/ScrollViewAndroid.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/platform/android/ScrollViewAndroid.cpp b/Source/WebCore/platform/android/ScrollViewAndroid.cpp index f54e5ea..f29e998 100644 --- a/Source/WebCore/platform/android/ScrollViewAndroid.cpp +++ b/Source/WebCore/platform/android/ScrollViewAndroid.cpp @@ -100,7 +100,8 @@ void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt) { if (parent()) // don't attempt to scroll subframes; they're fully visible return; - PlatformBridge::setScrollPosition(this, pt.x(), pt.y()); + PlatformBridge::setScrollPosition(this, m_scrollOrigin.x() + pt.x(), + m_scrollOrigin.y() + pt.y()); } void ScrollView::platformSetScrollbarModes() @@ -119,7 +120,9 @@ void ScrollView::platformScrollbarModes(ScrollbarMode& h, ScrollbarMode& v) cons void ScrollView::platformRepaintContentRectangle(const IntRect &rect, bool now) { - android::WebViewCore::getWebViewCore(this)->contentInvalidate(rect); + IntRect offsetRect = rect; + offsetRect.move(m_scrollOrigin.x(), m_scrollOrigin.y()); + android::WebViewCore::getWebViewCore(this)->contentInvalidate(offsetRect); } #ifdef ANDROID_CAPTURE_OFFSCREEN_PAINTS |