Title: [129925] trunk/Source/WebKit/blackberry
Revision
129925
Author
[email protected]
Date
2012-09-28 11:19:14 -0700 (Fri, 28 Sep 2012)

Log Message

[BlackBerry] Update the value of window.devicePixelRation when it is set programmatically
https://bugs.webkit.org/show_bug.cgi?id=97512

Reviewed by Rob Buis.

RIM PR 213984
Set the deviceScaleFactor of the page explicity when the
devicePixelRatio is changed.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (129924 => 129925)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-09-28 18:16:35 UTC (rev 129924)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-09-28 18:19:14 UTC (rev 129925)
@@ -3473,6 +3473,7 @@
     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);
 
     setUserScalable(m_webSettings->isUserScalable() && result.userScalable);
     if (result.initialScale > 0)
@@ -6114,6 +6115,8 @@
         Platform::userInterfaceThreadMessageClient()->dispatchMessage(
             createMethodCallMessage(&WebPagePrivate::setCompositorBackgroundColor, this, backgroundColor));
     }
+
+    m_page->setDeviceScaleFactor(webSettings->devicePixelRatio());
 }
 
 WebString WebPage::textHasAttribute(const WebString& query) const

Modified: trunk/Source/WebKit/blackberry/ChangeLog (129924 => 129925)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-09-28 18:16:35 UTC (rev 129924)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-09-28 18:19:14 UTC (rev 129925)
@@ -1,3 +1,18 @@
+2012-09-28  Konrad Piascik  <[email protected]>
+
+        [BlackBerry] Update the value of window.devicePixelRation when it is set programmatically
+        https://bugs.webkit.org/show_bug.cgi?id=97512
+
+        Reviewed by Rob Buis.
+
+        RIM PR 213984
+        Set the deviceScaleFactor of the page explicity when the
+        devicePixelRatio is changed.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
+        (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+
 2012-09-28  Mikhail Pozdnyakov  <[email protected]>
 
         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to