summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2011-07-01 17:34:23 -0700
committerShimeng (Simon) Wang <swang@google.com>2011-07-01 17:59:18 -0700
commit706c2b4c3089f2832c8172c0581e3df110bf534c (patch)
treeb67792989eb1b567555f85a6b256b28e8fed198b /Source/WebCore
parent94bd391238210e19ce80d03518fafab7d6d939b0 (diff)
downloadexternal_webkit-706c2b4c3089f2832c8172c0581e3df110bf534c.zip
external_webkit-706c2b4c3089f2832c8172c0581e3df110bf534c.tar.gz
external_webkit-706c2b4c3089f2832c8172c0581e3df110bf534c.tar.bz2
Factor the scale into the actual screen space calculation.
issue: 4982074 Change-Id: I5d86539a17393f3060cd67bd4c6888734037c7e4
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)