Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jan 2018 17:21:37 +0000 (17:21 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jan 2018 17:21:37 +0000 (17:21 +0000)
commitd525f6c54d534d0a92a636b5a949dce206788748
treedc7c571e7146d6d89e29a1156f9bd5e7063c6c4c
parentb12043e6b6511f123daa2ab2e6fc47845215a7bf
Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
https://bugs.webkit.org/show_bug.cgi?id=180897
<rdar://problem/35535328>

Reviewed by Brent Fulgham.

Source/WebKit:

* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::changeWebsiteDataStore):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
(WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
(WebKit::WebProcessPool::pageAddedToProcess): Deleted.
(WebKit::WebProcessPool::pageRemovedFromProcess): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

Tools:

Test two forms of storage to be sure we are using a different WebsiteDataStore: cookies and sessionStorage.

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate webView:startURLSchemeTask:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(websiteDataStoreTestWebView):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebsitePoliciesData.cpp
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm