Serialize WebsitePoliciesData instead of WebsitePolicies
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2017 02:08:23 +0000 (02:08 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2017 02:08:23 +0000 (02:08 +0000)
commit6edee32bf4c7e0e1c587e80c7ca4ad73c932bd10
tree7a1dbccba4651a36e1ffe5e40adb5a701aba1ee4
parentcae4735c9dc80da37f6722798d61523b848aa886
Serialize WebsitePoliciesData instead of WebsitePolicies
https://bugs.webkit.org/show_bug.cgi?id=180847

Reviewed by Joseph Pecoraro.

No change in behavior.  This will allow me to add things to WebsitePolicies that have
a different form when serialized to another process.

Also, remove API::WebsitePolicies because the wrapper isn't necessary.
WebsitePolicies is now the API type that only exists in the UIProcess.

* Shared/WebsitePolicies.cpp: Removed.
* Shared/WebsitePolicies.h:
(WebKit::WebsitePolicies::contentBlockersEnabled const): Deleted.
(WebKit::WebsitePolicies::setContentBlockersEnabled): Deleted.
(WebKit::WebsitePolicies::allowedAutoplayQuirks const): Deleted.
(WebKit::WebsitePolicies::setAllowedAutoplayQuirks): Deleted.
(WebKit::WebsitePolicies::autoplayPolicy const): Deleted.
(WebKit::WebsitePolicies::setAutoplayPolicy): Deleted.
(WebKit::WebsitePolicies::customHeaderFields): Deleted.
(WebKit::WebsitePolicies::takeCustomHeaderFields): Deleted.
(WebKit::WebsitePolicies::setCustomHeaderFields): Deleted.
* Shared/WebsitePoliciesData.cpp: Copied from Source/WebKit/Shared/WebsitePolicies.cpp.
(WebKit::WebsitePoliciesData::fromWebsitePolicies):
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
(WebKit::WebsitePolicies::WebsitePolicies): Deleted.
(WebKit::WebsitePolicies::encode const): Deleted.
(WebKit::WebsitePolicies::decode): Deleted.
(WebKit::WebsitePolicies::applyToDocumentLoader): Deleted.
* Shared/WebsitePoliciesData.h: Added.
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::decidePolicyForNavigationAction):
(API::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
* UIProcess/API/APIWebsitePolicies.cpp: Removed.
* UIProcess/API/APIWebsitePolicies.h: Removed.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerUse):
(WKFramePolicyListenerUseWithPolicies):
* UIProcess/API/C/WKPage.cpp:
(WKPageUpdateWebsitePolicies):
(WKPageSetPagePolicyClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesGetTypeID):
(WKWebsitePoliciesCreate):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateWebsitePolicies:]):
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies dealloc]):
(-[_WKWebsitePolicies init]):
* UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h:
(WebKit::wrapper):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::receivedPolicyDecision):
* UIProcess/WebFrameListenerProxy.h:
* UIProcess/WebFramePolicyListenerProxy.cpp:
(WebKit::WebFramePolicyListenerProxy::use):
(WebKit::WebFramePolicyListenerProxy::download):
(WebKit::WebFramePolicyListenerProxy::ignore):
* UIProcess/WebFramePolicyListenerProxy.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::updateWebsitePolicies):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision):
(WebKit::WebPage::updateWebsitePolicies):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebsitePoliciesData.cpp [moved from Source/WebKit/Shared/WebsitePolicies.cpp with 77% similarity]
Source/WebKit/Shared/WebsitePoliciesData.h [moved from Source/WebKit/UIProcess/API/APIWebsitePolicies.cpp with 68% similarity]
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/API/APIPolicyClient.h
Source/WebKit/UIProcess/API/APIWebsitePolicies.h [deleted file]
Source/WebKit/UIProcess/API/C/WKAPICast.h
Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/API/C/WKWebsitePolicies.cpp
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePolicies.mm
Source/WebKit/UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/WebFrameListenerProxy.cpp
Source/WebKit/UIProcess/WebFrameListenerProxy.h
Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp
Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h
Source/WebKit/UIProcess/WebFrameProxy.cpp
Source/WebKit/UIProcess/WebFrameProxy.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/WebsitePolicies.h [moved from Source/WebKit/Shared/WebsitePolicies.h with 83% similarity]
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Source/WebKit/WebProcess/WebPage/WebFrame.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in