summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/Api/WebPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/blackberry/Api/WebPage.cpp')
-rw-r--r--Source/WebKit/blackberry/Api/WebPage.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp
index d2b7f7898..d008c02df 100644
--- a/Source/WebKit/blackberry/Api/WebPage.cpp
+++ b/Source/WebKit/blackberry/Api/WebPage.cpp
@@ -3445,16 +3445,17 @@ IntSize WebPagePrivate::recomputeVirtualViewportFromViewportArguments()
int desktopWidth = DEFAULT_MAX_LAYOUT_WIDTH;
int deviceWidth = Platform::Graphics::Screen::primaryScreen()->width();
int deviceHeight = Platform::Graphics::Screen::primaryScreen()->height();
- ViewportAttributes result = computeViewportAttributes(m_viewportArguments, desktopWidth, deviceWidth, deviceHeight, m_webSettings->devicePixelRatio(), m_defaultLayoutSize);
- m_page->setDeviceScaleFactor(result.devicePixelRatio);
+ float devicePixelRatio = m_webSettings->devicePixelRatio();
+ ViewportAttributes result = computeViewportAttributes(m_viewportArguments, desktopWidth, deviceWidth, deviceHeight, devicePixelRatio, m_defaultLayoutSize);
+ m_page->setDeviceScaleFactor(devicePixelRatio);
setUserScalable(m_webSettings->isUserScalable() && result.userScalable);
if (result.initialScale > 0)
- setInitialScale(result.initialScale * result.devicePixelRatio);
+ setInitialScale(result.initialScale * devicePixelRatio);
if (result.minimumScale > 0)
- setMinimumScale(result.minimumScale * result.devicePixelRatio);
+ setMinimumScale(result.minimumScale * devicePixelRatio);
if (result.maximumScale > 0)
- setMaximumScale(result.maximumScale * result.devicePixelRatio);
+ setMaximumScale(result.maximumScale * devicePixelRatio);
return IntSize(result.layoutSize.width(), result.layoutSize.height());
}