Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a comple...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 21:47:08 +0000 (21:47 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 21:47:08 +0000 (21:47 +0000)
commitc9eb04b80e61d08ce31bf11e55aee658c0bd1aae
tree9ff9bb4d10ec13c394d5c4c71782f989e9f552bb
parentea5511d41b5845e0bf03785c391a6335fa723359
Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a completion handler
https://bugs.webkit.org/show_bug.cgi?id=192272

Reviewed by Brady Eidson.

Source/WebCore:

This is needed for rdar://problem/45910057
Covered by an API test.

* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:

Source/WebKit:

* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
(API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(ResourceLoadClient::ResourceLoadClient):
(ResourceLoadClient::loadDelegate const):
(ResourceLoadClient::pluginContextController const):
(PageLoaderClient::PageLoaderClient):
(PageLoaderClient::loadDelegate const):
(PageLoaderClient::pluginContextController const):
(PageLoaderClient::didStartProvisionalLoadForFrame):
(PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(PageLoaderClient::didFinishLoadForFrame):
(PageLoaderClient::globalObjectIsAvailableForFrame):
(PageLoaderClient::didRemoveFrameFromHierarchy):
(PageLoaderClient::didCommitLoadForFrame):
(PageLoaderClient::didFinishDocumentLoadForFrame):
(PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(PageLoaderClient::didFailLoadWithErrorForFrame):
(PageLoaderClient::didSameDocumentNavigationForFrame):
(PageLoaderClient::didLayoutForFrame):
(PageLoaderClient::didReachLayoutMilestone):
(PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(PageLoaderClient::didHandleOnloadEventsForFrame):
(PageLoaderClient::userAgentForURL const):
(ResourceLoadClient::willSendRequestForFrame):
(ResourceLoadClient::didInitiateLoadForResource):
(ResourceLoadClient::didFinishLoadForResource):
(ResourceLoadClient::didFailLoadForResource):
(-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
(didStartProvisionalLoadForFrame): Deleted.
(didReceiveServerRedirectForProvisionalLoadForFrame): Deleted.
(didFinishLoadForFrame): Deleted.
(globalObjectIsAvailableForFrame): Deleted.
(didRemoveFrameFromHierarchy): Deleted.
(didCommitLoadForFrame): Deleted.
(didFinishDocumentLoadForFrame): Deleted.
(didFailProvisionalLoadWithErrorForFrame): Deleted.
(didFailLoadWithErrorForFrame): Deleted.
(didSameDocumentNavigationForFrame): Deleted.
(didLayoutForFrame): Deleted.
(didReachLayoutMilestone): Deleted.
(didFirstVisuallyNonEmptyLayoutForFrame): Deleted.
(didHandleOnloadEventsForFrame): Deleted.
(userAgentForURL): Deleted.
(setUpPageLoaderClient): Deleted.
(willSendRequestForFrame): Deleted.
(didInitiateLoadForResource): Deleted.
(didFinishLoadForResource): Deleted.
(didFailLoadForResource): Deleted.
(setUpResourceLoadClient): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm:
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:willStartProvisionalLoadForFrame:completionHandler:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyFrameLoaderClient.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h
Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm