Add an SPI policy action to allow clients to explicitly ask for a new process on...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 16:56:58 +0000 (16:56 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 16:56:58 +0000 (16:56 +0000)
commite68fd6168e1dc1453408d178cf13e9b9d904966d
tree7ab331668bf897e164668df894b878332e8f1da1
parentc819009145f6d42d71328a9892951c7db1e94cdf
Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation.
https://bugs.webkit.org/show_bug.cgi?id=187789

Reviewed by Andy Estes.

Source/WebKit:

At navigation policy time, when a client says "use/allow", they can now say "use/allow in a new process if possible"

* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerUseInNewProcess):
(WKFramePolicyListenerUseInNewProcessWithPolicies):
* UIProcess/API/C/WKFramePolicyListener.h:

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::setApplyPolicyInNewProcessIfPossible):
(WebKit::WebFrameListenerProxy::applyPolicyInNewProcessIfPossible const):

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
* UIProcess/WebProcessPool.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate init]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKFramePolicyListener.cpp
Source/WebKit/UIProcess/API/C/WKFramePolicyListener.h
Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/WebFrameListenerProxy.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm