The viewport code should not depend on WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=130218
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-13
Reviewed by Tim Horton.
Source/WebCore:
The viewport code cannot be generalized to other ports because it relies
on WebKit system interface to get the device screen size.
This patch fixes that by going through ChromeClient to get the data.
* dom/Document.cpp:
(WebCore::Document::processViewport):
Get the screensize from chrome client.
* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes):
This is dead code. Nothing should ever use computeViewportAttributes().
(WebCore::finalizeViewportArguments):
* dom/ViewportArguments.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::viewportScreenSize):
Source/WebKit/ios:
* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::viewportScreenSize):
Get the viewport size from WebKitSystemInterface.
Source/WebKit2:
Get the viewport size from the UIProcess when creating a new WebProcess.
From there, the value is stored in WebPage and used whenever we need to update
the viewport parameters.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportScreenSize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165577
268f45cc-cd09-0410-ab3c-
d52691b4dbfc