summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2011-07-01 18:24:22 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-01 18:24:22 -0700
commit63cbafa7c232a74163d9ed8030578be970cd25a9 (patch)
tree0cd415cbba0612b168476ea5f9d69621a64cd89a /Source/WebCore
parent84373792909396d36824255d643e86b3d3a2f28a (diff)
parent706c2b4c3089f2832c8172c0581e3df110bf534c (diff)
downloadexternal_webkit-63cbafa7c232a74163d9ed8030578be970cd25a9.zip
external_webkit-63cbafa7c232a74163d9ed8030578be970cd25a9.tar.gz
external_webkit-63cbafa7c232a74163d9ed8030578be970cd25a9.tar.bz2
Merge "Factor the scale into the actual screen space calculation."
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/android/ScrollViewAndroid.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/WebCore/platform/android/ScrollViewAndroid.cpp b/Source/WebCore/platform/android/ScrollViewAndroid.cpp
index f54e5ea..87c6a1f 100644
--- a/Source/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/Source/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -68,32 +68,36 @@ IntSize ScrollView::platformContentsSize() const
return m_contentsSize;
}
+static float getWebViewCoreScale(const ScrollView* view) {
+ return android::WebViewCore::getWebViewCore(view)->scale();
+}
+
int ScrollView::platformActualWidth() const
{
if (parent())
return width();
- return platformWidget()->visibleWidth();
+ return platformWidget()->visibleWidth() * getWebViewCoreScale(this);
}
int ScrollView::platformActualHeight() const
{
if (parent())
return height();
- return platformWidget()->visibleHeight();
+ return platformWidget()->visibleHeight() * getWebViewCoreScale(this);
}
int ScrollView::platformActualScrollX() const
{
if (parent())
return scrollX();
- return platformWidget()->visibleX();
+ return platformWidget()->visibleX() * getWebViewCoreScale(this);
}
int ScrollView::platformActualScrollY() const
{
if (parent())
return scrollY();
- return platformWidget()->visibleY();
+ return platformWidget()->visibleY() * getWebViewCoreScale(this);
}
void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt)