Title: [116178] trunk/Source/WebKit2
- Revision
- 116178
- Author
- [email protected]
- Date
- 2012-05-04 15:01:07 -0700 (Fri, 04 May 2012)
Log Message
Set the right device scale factor when creating the web page
https://bugs.webkit.org/show_bug.cgi?id=85667
<rdar://problem/11376611>
Reviewed by Oliver Hunt.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
Set the scale factor before initializing the page, to ensure that the WebPageCreationParameters struct gets the right scale factor.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
This can now be called with a null drawing area. Also, remove the isValid() check since we still want to update the scale factor even if the web process has crashed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set the device scale factor from the creation parameters.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (116177 => 116178)
--- trunk/Source/WebKit2/ChangeLog 2012-05-04 21:40:48 UTC (rev 116177)
+++ trunk/Source/WebKit2/ChangeLog 2012-05-04 22:01:07 UTC (rev 116178)
@@ -1,3 +1,23 @@
+2012-05-04 Anders Carlsson <[email protected]>
+
+ Set the right device scale factor when creating the web page
+ https://bugs.webkit.org/show_bug.cgi?id=85667
+ <rdar://problem/11376611>
+
+ Reviewed by Oliver Hunt.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:contextRef:pageGroupRef:]):
+ Set the scale factor before initializing the page, to ensure that the WebPageCreationParameters struct gets the right scale factor.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
+ This can now be called with a null drawing area. Also, remove the isValid() check since we still want to update the scale factor even if the web process has crashed.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ Set the device scale factor from the creation parameters.
+
2012-05-02 Jer Noble <[email protected]>
Taking a visibility:hidden element full screen causes full screen window to disappear.
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (116177 => 116178)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-05-04 21:40:48 UTC (rev 116177)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2012-05-04 22:01:07 UTC (rev 116178)
@@ -2910,8 +2910,8 @@
_data->_pageClient = PageClientImpl::create(self);
_data->_page = toImpl(contextRef)->createWebPage(_data->_pageClient.get(), toImpl(pageGroupRef));
+ _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
_data->_page->initializeWebPage();
- _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
#if ENABLE(FULLSCREEN_API)
_data->_page->fullScreenManager()->setWebView(self);
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (116177 => 116178)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-05-04 21:40:48 UTC (rev 116177)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-05-04 22:01:07 UTC (rev 116178)
@@ -1317,14 +1317,13 @@
void WebPageProxy::setIntrinsicDeviceScaleFactor(float scaleFactor)
{
- if (!isValid())
- return;
-
if (m_intrinsicDeviceScaleFactor == scaleFactor)
return;
m_intrinsicDeviceScaleFactor = scaleFactor;
- m_drawingArea->deviceScaleFactorDidChange();
+
+ if (m_drawingArea)
+ m_drawingArea->deviceScaleFactorDidChange();
}
void WebPageProxy::windowScreenDidChange(PlatformDisplayID displayID)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (116177 => 116178)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-04 21:40:48 UTC (rev 116177)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-05-04 22:01:07 UTC (rev 116178)
@@ -270,6 +270,7 @@
m_pageGroup = WebProcess::shared().webPageGroup(parameters.pageGroupData);
m_page->setGroupName(m_pageGroup->identifier());
+ m_page->setDeviceScaleFactor(parameters.deviceScaleFactor);
platformInitialize();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes