Remove most of LoaderClient
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Aug 2018 21:00:25 +0000 (21:00 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Aug 2018 21:00:25 +0000 (21:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188997

Reviewed by Tim Horton.

We still have a few clients using basic functionality that are transitioning to WKPageNavigationClient,
but most of it can be removed.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::~LoaderClient):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::LoaderClient::didReachLayoutMilestone):
(API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
(API::LoaderClient::didCommitLoadForFrame): Deleted.
(API::LoaderClient::didFinishDocumentLoadForFrame): Deleted.
(API::LoaderClient::didSameDocumentNavigationForFrame): Deleted.
(API::LoaderClient::didReceiveTitleForFrame): Deleted.
(API::LoaderClient::didFirstLayoutForFrame): Deleted.
(API::LoaderClient::didDisplayInsecureContentForFrame): Deleted.
(API::LoaderClient::didRunInsecureContentForFrame): Deleted.
(API::LoaderClient::didDetectXSSForFrame): Deleted.
(API::LoaderClient::didReceiveAuthenticationChallengeInFrame): Deleted.
(API::LoaderClient::didStartProgress): Deleted.
(API::LoaderClient::didChangeProgress): Deleted.
(API::LoaderClient::didFinishProgress): Deleted.
(API::LoaderClient::processDidBecomeUnresponsive): Deleted.
(API::LoaderClient::processDidBecomeResponsive): Deleted.
(API::LoaderClient::processDidCrash): Deleted.
(API::LoaderClient::didChangeBackForwardList): Deleted.
(API::LoaderClient::willGoToBackForwardListItem): Deleted.
(API::LoaderClient::didNavigateWithNavigationData): Deleted.
(API::LoaderClient::didPerformClientRedirect): Deleted.
(API::LoaderClient::didPerformServerRedirect): Deleted.
(API::LoaderClient::didUpdateHistoryTitle): Deleted.
(API::LoaderClient::navigationGestureDidBegin): Deleted.
(API::LoaderClient::navigationGestureWillEnd): Deleted.
(API::LoaderClient::navigationGestureDidEnd): Deleted.
(API::LoaderClient::pluginLoadPolicy): Deleted.
(API::LoaderClient::didFailToInitializePlugin): Deleted.
(API::LoaderClient::didBlockInsecurePluginVersion): Deleted.
(API::LoaderClient::webGLLoadPolicy const): Deleted.
(API::LoaderClient::resolveWebGLLoadPolicy const): Deleted.
(API::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame): Deleted.
(API::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame):
(WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235398 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APILoaderClient.h
Source/WebKit/UIProcess/API/C/WKPage.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

index 4570a9b..f560809 100644 (file)
@@ -1,5 +1,86 @@
 2018-08-27  Alex Christensen  <achristensen@webkit.org>
 
+        Remove most of LoaderClient
+        https://bugs.webkit.org/show_bug.cgi?id=188997
+
+        Reviewed by Tim Horton.
+
+        We still have a few clients using basic functionality that are transitioning to WKPageNavigationClient,
+        but most of it can be removed.
+
+        * UIProcess/API/APILoaderClient.h:
+        (API::LoaderClient::~LoaderClient):
+        (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
+        (API::LoaderClient::didFailLoadWithErrorForFrame):
+        (API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
+        (API::LoaderClient::didReachLayoutMilestone):
+        (API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
+        (API::LoaderClient::didCommitLoadForFrame): Deleted.
+        (API::LoaderClient::didFinishDocumentLoadForFrame): Deleted.
+        (API::LoaderClient::didSameDocumentNavigationForFrame): Deleted.
+        (API::LoaderClient::didReceiveTitleForFrame): Deleted.
+        (API::LoaderClient::didFirstLayoutForFrame): Deleted.
+        (API::LoaderClient::didDisplayInsecureContentForFrame): Deleted.
+        (API::LoaderClient::didRunInsecureContentForFrame): Deleted.
+        (API::LoaderClient::didDetectXSSForFrame): Deleted.
+        (API::LoaderClient::didReceiveAuthenticationChallengeInFrame): Deleted.
+        (API::LoaderClient::didStartProgress): Deleted.
+        (API::LoaderClient::didChangeProgress): Deleted.
+        (API::LoaderClient::didFinishProgress): Deleted.
+        (API::LoaderClient::processDidBecomeUnresponsive): Deleted.
+        (API::LoaderClient::processDidBecomeResponsive): Deleted.
+        (API::LoaderClient::processDidCrash): Deleted.
+        (API::LoaderClient::didChangeBackForwardList): Deleted.
+        (API::LoaderClient::willGoToBackForwardListItem): Deleted.
+        (API::LoaderClient::didNavigateWithNavigationData): Deleted.
+        (API::LoaderClient::didPerformClientRedirect): Deleted.
+        (API::LoaderClient::didPerformServerRedirect): Deleted.
+        (API::LoaderClient::didUpdateHistoryTitle): Deleted.
+        (API::LoaderClient::navigationGestureDidBegin): Deleted.
+        (API::LoaderClient::navigationGestureWillEnd): Deleted.
+        (API::LoaderClient::navigationGestureDidEnd): Deleted.
+        (API::LoaderClient::pluginLoadPolicy): Deleted.
+        (API::LoaderClient::didFailToInitializePlugin): Deleted.
+        (API::LoaderClient::didBlockInsecurePluginVersion): Deleted.
+        (API::LoaderClient::webGLLoadPolicy const): Deleted.
+        (API::LoaderClient::resolveWebGLLoadPolicy const): Deleted.
+        (API::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame): Deleted.
+        (API::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame): Deleted.
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didChangeBackForwardList):
+        (WebKit::WebPageProxy::willGoToBackForwardListItem):
+        (WebKit::WebPageProxy::didStartProgress):
+        (WebKit::WebPageProxy::didChangeProgress):
+        (WebKit::WebPageProxy::didFinishProgress):
+        (WebKit::WebPageProxy::didCommitLoadForFrame):
+        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
+        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
+        (WebKit::WebPageProxy::didReceiveTitleForFrame):
+        (WebKit::WebPageProxy::didFirstLayoutForFrame):
+        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
+        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
+        (WebKit::WebPageProxy::didDetectXSSForFrame):
+        (WebKit::WebPageProxy::didNavigateWithNavigationData):
+        (WebKit::WebPageProxy::didPerformClientRedirect):
+        (WebKit::WebPageProxy::didPerformServerRedirect):
+        (WebKit::WebPageProxy::didUpdateHistoryTitle):
+        (WebKit::WebPageProxy::webGLPolicyForURL):
+        (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
+        (WebKit::WebPageProxy::processDidBecomeUnresponsive):
+        (WebKit::WebPageProxy::processDidBecomeResponsive):
+        (WebKit::WebPageProxy::dispatchProcessDidTerminate):
+        (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
+        (WebKit::WebPageProxy::navigationGestureDidBegin):
+        (WebKit::WebPageProxy::navigationGestureWillEnd):
+        (WebKit::WebPageProxy::navigationGestureDidEnd):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame):
+        (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame):
+
+2018-08-27  Alex Christensen  <achristensen@webkit.org>
+
         REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
         https://bugs.webkit.org/show_bug.cgi?id=189002
 
index e35ecf2..6608675 100644 (file)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef APILoaderClient_h
-#define APILoaderClient_h
+#pragma once
 
 #include "APIData.h"
 #include "PluginModuleInfo.h"
@@ -56,67 +55,14 @@ class Object;
 class LoaderClient {
 public:
     virtual ~LoaderClient() { }
-
     virtual void didStartProvisionalLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { }
     virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { }
     virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, const WebCore::ResourceError&, API::Object*) { }
-    virtual void didCommitLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { }
-    virtual void didFinishDocumentLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { }
     virtual void didFinishLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { }
     virtual void didFailLoadWithErrorForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, const WebCore::ResourceError&, API::Object*) { }
-    virtual void didSameDocumentNavigationForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, WebKit::SameDocumentNavigationType, API::Object*) { }
-    virtual void didReceiveTitleForFrame(WebKit::WebPageProxy&, const WTF::String&, WebKit::WebFrameProxy&, API::Object*) { }
-    virtual void didFirstLayoutForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { }
-
-    // FIXME: We should consider removing didFirstVisuallyNonEmptyLayoutForFrame since it is replaced by didLayout.
     virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { }
-
-    virtual void didDisplayInsecureContentForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { }
-    virtual void didRunInsecureContentForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { }
-    virtual void didDetectXSSForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { }
-
     virtual void didReachLayoutMilestone(WebKit::WebPageProxy&, WebCore::LayoutMilestones) { }
-    virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebKit::AuthenticationChallengeProxy&) { }
-
-    virtual void didStartProgress(WebKit::WebPageProxy&) { }
-    virtual void didChangeProgress(WebKit::WebPageProxy&) { }
-    virtual void didFinishProgress(WebKit::WebPageProxy&) { }
-
-    // FIXME: These functions should not be part of this client.
-    virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy&) { }
-    virtual void processDidBecomeResponsive(WebKit::WebPageProxy&) { }
-    virtual bool processDidCrash(WebKit::WebPageProxy&) { return false; }
-
-    virtual void didChangeBackForwardList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem*, Vector<Ref<WebKit::WebBackForwardListItem>>&&) { }
     virtual bool shouldKeepCurrentBackForwardListItemInList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&) { return true; }
-    virtual void willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, API::Object*) { }
-
-    virtual void didNavigateWithNavigationData(WebKit::WebPageProxy&, const WebKit::WebNavigationDataStore&, WebKit::WebFrameProxy&) { }
-    virtual void didPerformClientRedirect(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
-    virtual void didPerformServerRedirect(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
-    virtual void didUpdateHistoryTitle(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
-
-    virtual void navigationGestureDidBegin(WebKit::WebPageProxy&) { }
-    virtual void navigationGestureWillEnd(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
-    virtual void navigationGestureDidEnd(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
-    virtual void pluginLoadPolicy(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary&, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const WTF::String&)>&& completionHandler) { completionHandler(currentPluginLoadPolicy, { }); }
-    virtual void didFailToInitializePlugin(WebKit::WebPageProxy&, API::Dictionary&) { }
-    virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy&, API::Dictionary&) { }
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
-#if ENABLE(WEBGL)
-    virtual WebCore::WebGLLoadPolicy webGLLoadPolicy(WebKit::WebPageProxy&, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
-    virtual WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WTF::String&) const { return WebCore::WebGLLoadPolicy::WebGLAllowCreation; }
-#endif // ENABLE(WEBGL)
-
-#if USE(QUICK_LOOK)
-    virtual void didStartLoadForQuickLookDocumentInMainFrame(const WTF::String& fileName, const WTF::String& uti) { }
-    virtual void didFinishLoadForQuickLookDocumentInMainFrame(const WebKit::QuickLookDocumentData&) { }
-#endif
 };
 
 } // namespace API
-
-#endif // APILoaderClient_h
index 1b61bc7..87bc227 100644 (file)
@@ -1042,6 +1042,42 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
         explicit LoaderClient(const WKPageLoaderClientBase* client)
         {
             initialize(client);
+            
+            // WKPageSetPageLoaderClient is deprecated. Use WKPageSetPageNavigationClient instead.
+            RELEASE_ASSERT(!m_client.didCommitLoadForFrame);
+            RELEASE_ASSERT(!m_client.didFinishDocumentLoadForFrame);
+            RELEASE_ASSERT(!m_client.didSameDocumentNavigationForFrame);
+            RELEASE_ASSERT(!m_client.didReceiveTitleForFrame);
+            RELEASE_ASSERT(!m_client.didFirstLayoutForFrame);
+            RELEASE_ASSERT(!m_client.didRemoveFrameFromHierarchy);
+            RELEASE_ASSERT(!m_client.didDisplayInsecureContentForFrame);
+            RELEASE_ASSERT(!m_client.didRunInsecureContentForFrame);
+            RELEASE_ASSERT(!m_client.canAuthenticateAgainstProtectionSpaceInFrame);
+            RELEASE_ASSERT(!m_client.didReceiveAuthenticationChallengeInFrame);
+            RELEASE_ASSERT(!m_client.didStartProgress);
+            RELEASE_ASSERT(!m_client.didChangeProgress);
+            RELEASE_ASSERT(!m_client.didFinishProgress);
+            RELEASE_ASSERT(!m_client.processDidBecomeUnresponsive);
+            RELEASE_ASSERT(!m_client.processDidBecomeResponsive);
+            RELEASE_ASSERT(!m_client.processDidCrash);
+            RELEASE_ASSERT(!m_client.didChangeBackForwardList);
+            RELEASE_ASSERT(!m_client.shouldGoToBackForwardListItem);
+            RELEASE_ASSERT(!m_client.didFailToInitializePlugin_deprecatedForUseWithV0);
+            RELEASE_ASSERT(!m_client.didDetectXSSForFrame);
+            RELEASE_ASSERT(!m_client.didNewFirstVisuallyNonEmptyLayout_unavailable);
+            RELEASE_ASSERT(!m_client.willGoToBackForwardListItem);
+            RELEASE_ASSERT(!m_client.interactionOccurredWhileProcessUnresponsive);
+            RELEASE_ASSERT(!m_client.pluginDidFail_deprecatedForUseWithV1);
+            RELEASE_ASSERT(!m_client.didReceiveIntentForFrame_unavailable);
+            RELEASE_ASSERT(!m_client.registerIntentServiceForFrame_unavailable);
+            RELEASE_ASSERT(!m_client.pluginLoadPolicy_deprecatedForUseWithV2);
+            RELEASE_ASSERT(!m_client.pluginDidFail);
+            RELEASE_ASSERT(!m_client.pluginLoadPolicy);
+            RELEASE_ASSERT(!m_client.webGLLoadPolicy);
+            RELEASE_ASSERT(!m_client.resolveWebGLLoadPolicy);
+            RELEASE_ASSERT(!m_client.navigationGestureDidBegin);
+            RELEASE_ASSERT(!m_client.navigationGestureWillEnd);
+            RELEASE_ASSERT(!m_client.navigationGestureDidEnd);
         }
 
     private:
@@ -1069,22 +1105,6 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
             m_client.didFailProvisionalLoadWithErrorForFrame(toAPI(&page), toAPI(&frame), toAPI(error), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void didCommitLoadForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, API::Object* userData) override
-        {
-            if (!m_client.didCommitLoadForFrame)
-                return;
-
-            m_client.didCommitLoadForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didFinishDocumentLoadForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, API::Object* userData) override
-        {
-            if (!m_client.didFinishDocumentLoadForFrame)
-                return;
-
-            m_client.didFinishDocumentLoadForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
         void didFinishLoadForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, API::Object* userData) override
         {
             if (!m_client.didFinishLoadForFrame)
@@ -1101,30 +1121,6 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
             m_client.didFailLoadWithErrorForFrame(toAPI(&page), toAPI(&frame), toAPI(error), toAPI(userData), m_client.base.clientInfo);
         }
 
-        void didSameDocumentNavigationForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, SameDocumentNavigationType type, API::Object* userData) override
-        {
-            if (!m_client.didSameDocumentNavigationForFrame)
-                return;
-
-            m_client.didSameDocumentNavigationForFrame(toAPI(&page), toAPI(&frame), toAPI(type), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didReceiveTitleForFrame(WebPageProxy& page, const String& title, WebFrameProxy& frame, API::Object* userData) override
-        {
-            if (!m_client.didReceiveTitleForFrame)
-                return;
-
-            m_client.didReceiveTitleForFrame(toAPI(&page), toAPI(title.impl()), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didFirstLayoutForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Object* userData) override
-        {
-            if (!m_client.didFirstLayoutForFrame)
-                return;
-
-            m_client.didFirstLayoutForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
         void didFirstVisuallyNonEmptyLayoutForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Object* userData) override
         {
             if (!m_client.didFirstVisuallyNonEmptyLayoutForFrame)
@@ -1141,107 +1137,6 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
             m_client.didLayout(toAPI(&page), toWKLayoutMilestones(milestones), nullptr, m_client.base.clientInfo);
         }
 
-        void didDisplayInsecureContentForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Object* userData) override
-        {
-            if (!m_client.didDisplayInsecureContentForFrame)
-                return;
-
-            m_client.didDisplayInsecureContentForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didRunInsecureContentForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Object* userData) override
-        {
-            if (!m_client.didRunInsecureContentForFrame)
-                return;
-
-            m_client.didRunInsecureContentForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didDetectXSSForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Object* userData) override
-        {
-            if (!m_client.didDetectXSSForFrame)
-                return;
-
-            m_client.didDetectXSSForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void didReceiveAuthenticationChallengeInFrame(WebPageProxy& page, WebFrameProxy& frame, AuthenticationChallengeProxy& authenticationChallenge) override
-        {
-            if (m_client.canAuthenticateAgainstProtectionSpaceInFrame && !m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(&page), toAPI(&frame), toAPI(authenticationChallenge.protectionSpace()), m_client.base.clientInfo))
-                return authenticationChallenge.rejectProtectionSpaceAndContinue();
-            if (!m_client.didReceiveAuthenticationChallengeInFrame)
-                return authenticationChallenge.performDefaultHandling();
-
-            m_client.didReceiveAuthenticationChallengeInFrame(toAPI(&page), toAPI(&frame), toAPI(&authenticationChallenge), m_client.base.clientInfo);
-        }
-
-        void didStartProgress(WebPageProxy& page) override
-        {
-            if (!m_client.didStartProgress)
-                return;
-
-            m_client.didStartProgress(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        void didChangeProgress(WebPageProxy& page) override
-        {
-            if (!m_client.didChangeProgress)
-                return;
-
-            m_client.didChangeProgress(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        void didFinishProgress(WebPageProxy& page) override
-        {
-            if (!m_client.didFinishProgress)
-                return;
-
-            m_client.didFinishProgress(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        void processDidBecomeUnresponsive(WebPageProxy& page) override
-        {
-            if (!m_client.processDidBecomeUnresponsive)
-                return;
-
-            m_client.processDidBecomeUnresponsive(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        void processDidBecomeResponsive(WebPageProxy& page) override
-        {
-            if (!m_client.processDidBecomeResponsive)
-                return;
-
-            m_client.processDidBecomeResponsive(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        bool processDidCrash(WebPageProxy& page) override
-        {
-            if (!m_client.processDidCrash)
-                return false;
-
-            m_client.processDidCrash(toAPI(&page), m_client.base.clientInfo);
-            return true;
-        }
-
-        void didChangeBackForwardList(WebPageProxy& page, WebBackForwardListItem* addedItem, Vector<Ref<WebBackForwardListItem>>&& removedItems) override
-        {
-            if (!m_client.didChangeBackForwardList)
-                return;
-
-            RefPtr<API::Array> removedItemsArray;
-            if (!removedItems.isEmpty()) {
-                Vector<RefPtr<API::Object>> removedItemsVector;
-                removedItemsVector.reserveInitialCapacity(removedItems.size());
-                for (auto& removedItem : removedItems)
-                    removedItemsVector.append(WTFMove(removedItem));
-
-                removedItemsArray = API::Array::create(WTFMove(removedItemsVector));
-            }
-
-            m_client.didChangeBackForwardList(toAPI(&page), toAPI(addedItem), toAPI(removedItemsArray.get()), m_client.base.clientInfo);
-        }
-
         bool shouldKeepCurrentBackForwardListItemInList(WebKit::WebPageProxy& page, WebKit::WebBackForwardListItem& item) override
         {
             if (!m_client.shouldKeepCurrentBackForwardListItemInList)
@@ -1249,95 +1144,6 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
 
             return m_client.shouldKeepCurrentBackForwardListItemInList(toAPI(&page), toAPI(&item), m_client.base.clientInfo);
         }
-
-        void willGoToBackForwardListItem(WebPageProxy& page, WebBackForwardListItem& item, API::Object* userData) override
-        {
-            if (m_client.willGoToBackForwardListItem)
-                m_client.willGoToBackForwardListItem(toAPI(&page), toAPI(&item), toAPI(userData), m_client.base.clientInfo);
-        }
-
-        void navigationGestureDidBegin(WebPageProxy& page) override
-        {
-            if (m_client.navigationGestureDidBegin)
-                m_client.navigationGestureDidBegin(toAPI(&page), m_client.base.clientInfo);
-        }
-
-        void navigationGestureWillEnd(WebPageProxy& page, bool willNavigate, WebBackForwardListItem& item) override
-        {
-            if (m_client.navigationGestureWillEnd)
-                m_client.navigationGestureWillEnd(toAPI(&page), willNavigate, toAPI(&item), m_client.base.clientInfo);
-        }
-
-        void navigationGestureDidEnd(WebPageProxy& page, bool willNavigate, WebBackForwardListItem& item) override
-        {
-            if (m_client.navigationGestureDidEnd)
-                m_client.navigationGestureDidEnd(toAPI(&page), willNavigate, toAPI(&item), m_client.base.clientInfo);
-        }
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
-        void didFailToInitializePlugin(WebPageProxy& page, API::Dictionary& pluginInformation) final
-        {
-            if (m_client.didFailToInitializePlugin_deprecatedForUseWithV0)
-                m_client.didFailToInitializePlugin_deprecatedForUseWithV0(toAPI(&page), toAPI(pluginInformation.get<API::String>(pluginInformationMIMETypeKey())), m_client.base.clientInfo);
-
-            if (m_client.pluginDidFail_deprecatedForUseWithV1)
-                m_client.pluginDidFail_deprecatedForUseWithV1(toAPI(&page), kWKErrorCodeCannotLoadPlugIn, toAPI(pluginInformation.get<API::String>(pluginInformationMIMETypeKey())), 0, 0, m_client.base.clientInfo);
-
-            if (m_client.pluginDidFail)
-                m_client.pluginDidFail(toAPI(&page), kWKErrorCodeCannotLoadPlugIn, toAPI(&pluginInformation), m_client.base.clientInfo);
-        }
-
-        void didBlockInsecurePluginVersion(WebPageProxy& page, API::Dictionary& pluginInformation) override
-        {
-            if (m_client.pluginDidFail_deprecatedForUseWithV1)
-                m_client.pluginDidFail_deprecatedForUseWithV1(toAPI(&page), kWKErrorCodeInsecurePlugInVersion, toAPI(pluginInformation.get<API::String>(pluginInformationMIMETypeKey())), toAPI(pluginInformation.get<API::String>(pluginInformationBundleIdentifierKey())), toAPI(pluginInformation.get<API::String>(pluginInformationBundleVersionKey())), m_client.base.clientInfo);
-
-            if (m_client.pluginDidFail)
-                m_client.pluginDidFail(toAPI(&page), kWKErrorCodeInsecurePlugInVersion, toAPI(&pluginInformation), m_client.base.clientInfo);
-        }
-
-        void pluginLoadPolicy(WebPageProxy& page, PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary& pluginInformation, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const String&)>&& completionHandler) override
-        {
-            WKStringRef unavailabilityDescriptionOut = 0;
-            PluginModuleLoadPolicy loadPolicy = currentPluginLoadPolicy;
-
-            if (m_client.pluginLoadPolicy_deprecatedForUseWithV2)
-                loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy_deprecatedForUseWithV2(toAPI(&page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(&pluginInformation), m_client.base.clientInfo));
-            else if (m_client.pluginLoadPolicy)
-                loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(&page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(&pluginInformation), &unavailabilityDescriptionOut, m_client.base.clientInfo));
-
-            String unavailabilityDescription;
-            if (unavailabilityDescriptionOut) {
-                RefPtr<API::String> webUnavailabilityDescription = adoptRef(toImpl(unavailabilityDescriptionOut));
-                unavailabilityDescription = webUnavailabilityDescription->string();
-            }
-            
-            completionHandler(loadPolicy, unavailabilityDescription);
-        }
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
-#if ENABLE(WEBGL)
-        WebCore::WebGLLoadPolicy webGLLoadPolicy(WebPageProxy& page, const String& url) const override
-        {
-            WebCore::WebGLLoadPolicy loadPolicy = WebGLAllowCreation;
-
-            if (m_client.webGLLoadPolicy)
-                loadPolicy = toWebGLLoadPolicy(m_client.webGLLoadPolicy(toAPI(&page), toAPI(url.impl()), m_client.base.clientInfo));
-
-            return loadPolicy;
-        }
-
-        WebCore::WebGLLoadPolicy resolveWebGLLoadPolicy(WebPageProxy& page, const String& url) const override
-        {
-            WebCore::WebGLLoadPolicy loadPolicy = WebGLAllowCreation;
-
-            if (m_client.resolveWebGLLoadPolicy)
-                loadPolicy = toWebGLLoadPolicy(m_client.resolveWebGLLoadPolicy(toAPI(&page), toAPI(url.impl()), m_client.base.clientInfo));
-
-            return loadPolicy;
-        }
-
-#endif // ENABLE(WEBGL)
     };
 
     WebPageProxy* webPageProxy = toImpl(pageRef);
index fa8124c..a9914c1 100644 (file)
@@ -1270,8 +1270,8 @@ void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vecto
 {
     PageClientProtector protector(m_pageClient);
 
-    if (!m_navigationClient || !m_navigationClient->didChangeBackForwardList(*this, added, removed))
-        m_loaderClient->didChangeBackForwardList(*this, added, WTFMove(removed));
+    if (m_navigationClient)
+        m_navigationClient->didChangeBackForwardList(*this, added, removed);
 
     auto transaction = m_pageLoadState.transaction();
 
@@ -1284,9 +1284,8 @@ void WebPageProxy::willGoToBackForwardListItem(const BackForwardItemIdentifier&
     PageClientProtector protector(m_pageClient);
 
     if (auto* item = m_backForwardList->itemForID(itemID)) {
-        if (m_navigationClient && m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache, m_process->transformHandlesToObjects(userData.object()).get()))
-            return;
-        m_loaderClient->willGoToBackForwardListItem(*this, *item, m_process->transformHandlesToObjects(userData.object()).get());
+        if (m_navigationClient)
+            m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache, m_process->transformHandlesToObjects(userData.object()).get());
     }
 }
 
@@ -2196,11 +2195,8 @@ void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons
 #if PLATFORM(COCOA)
     if (m_navigationClient)
         m_navigationClient->decidePolicyForPluginLoad(*this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), WTFMove(findPluginCompletion));
-    else
-        m_loaderClient->pluginLoadPolicy(*this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), WTFMove(findPluginCompletion));
-#else
-    findPluginCompletion(pluginLoadPolicy, { });
 #endif
+    findPluginCompletion(pluginLoadPolicy, { });
 }
 
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
@@ -3375,7 +3371,6 @@ void WebPageProxy::didStartProgress()
     m_pageLoadState.didStartProgress(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient->didStartProgress(*this);
 }
 
 void WebPageProxy::didChangeProgress(double value)
@@ -3386,7 +3381,6 @@ void WebPageProxy::didChangeProgress(double value)
     m_pageLoadState.didChangeProgress(transaction, value);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient->didChangeProgress(*this);
 }
 
 void WebPageProxy::didFinishProgress()
@@ -3397,7 +3391,6 @@ void WebPageProxy::didFinishProgress()
     m_pageLoadState.didFinishProgress(transaction);
 
     m_pageLoadState.commitChanges();
-    m_loaderClient->didFinishProgress(*this);
 }
 
 void WebPageProxy::setNetworkRequestsInProgress(bool networkRequestsInProgress)
@@ -3677,11 +3670,8 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID
 #endif
 
     m_pageLoadState.commitChanges();
-    if (m_navigationClient) {
-        if (frame->isMainFrame())
-            m_navigationClient->didCommitNavigation(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
-    } else
-        m_loaderClient->didCommitLoadForFrame(*this, *frame, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
+    if (m_navigationClient && frame->isMainFrame())
+        m_navigationClient->didCommitNavigation(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
 
 #if ENABLE(ATTACHMENT_ELEMENT)
     if (frame->isMainFrame())
@@ -3706,11 +3696,8 @@ void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navi
     if (frame->isMainFrame() && navigationID)
         navigation = &navigationState().navigation(navigationID);
 
-    if (m_navigationClient) {
-        if (frame->isMainFrame())
-            m_navigationClient->didFinishDocumentLoad(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
-    } else
-        m_loaderClient->didFinishDocumentLoadForFrame(*this, *frame, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
+    if (m_navigationClient && frame->isMainFrame())
+        m_navigationClient->didFinishDocumentLoad(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get());
 }
 
 void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData& userData)
@@ -3830,11 +3817,8 @@ void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t
     m_pageLoadState.commitChanges();
 
     SameDocumentNavigationType navigationType = static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType);
-    if (m_navigationClient) {
-        if (isMainFrame)
-            m_navigationClient->didSameDocumentNavigation(*this, navigation.get(), navigationType, m_process->transformHandlesToObjects(userData.object()).get());
-    } else
-        m_loaderClient->didSameDocumentNavigationForFrame(*this, *frame, navigation.get(), navigationType, m_process->transformHandlesToObjects(userData.object()).get());
+    if (m_navigationClient && isMainFrame)
+        m_navigationClient->didSameDocumentNavigation(*this, navigation.get(), navigationType, m_process->transformHandlesToObjects(userData.object()).get());
 
     if (isMainFrame)
         m_pageClient.didSameDocumentNavigationForMainFrame(navigationType);
@@ -3871,17 +3855,10 @@ void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title
     frame->didChangeTitle(title);
     
     m_pageLoadState.commitChanges();
-    m_loaderClient->didReceiveTitleForFrame(*this, title, *frame, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
-void WebPageProxy::didFirstLayoutForFrame(uint64_t frameID, const UserData& userData)
+void WebPageProxy::didFirstLayoutForFrame(uint64_t, const UserData& userData)
 {
-    PageClientProtector protector(m_pageClient);
-
-    WebFrameProxy* frame = m_process->webFrame(frameID);
-    MESSAGE_CHECK(frame);
-
-    m_loaderClient->didFirstLayoutForFrame(*this, *frame, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
 void WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData& userData)
@@ -3925,8 +3902,6 @@ void WebPageProxy::didDisplayInsecureContentForFrame(uint64_t frameID, const Use
 
     if (m_navigationClient)
         m_navigationClient->didDisplayInsecureContent(*this, m_process->transformHandlesToObjects(userData.object()).get());
-    else
-        m_loaderClient->didDisplayInsecureContentForFrame(*this, *frame, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
 void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, const UserData& userData)
@@ -3942,18 +3917,10 @@ void WebPageProxy::didRunInsecureContentForFrame(uint64_t frameID, const UserDat
 
     if (m_navigationClient)
         m_navigationClient->didRunInsecureContent(*this, m_process->transformHandlesToObjects(userData.object()).get());
-    else
-        m_loaderClient->didRunInsecureContentForFrame(*this, *frame, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
-void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, const UserData& userData)
+void WebPageProxy::didDetectXSSForFrame(uint64_t, const UserData&)
 {
-    PageClientProtector protector(m_pageClient);
-
-    WebFrameProxy* frame = m_process->webFrame(frameID);
-    MESSAGE_CHECK(frame);
-
-    m_loaderClient->didDetectXSSForFrame(*this, *frame, m_process->transformHandlesToObjects(userData.object()).get());
 }
 
 void WebPageProxy::mainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
@@ -4203,11 +4170,8 @@ void WebPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& s
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK(frame->page() == this);
 
-    if (m_historyClient) {
-        if (frame->isMainFrame())
-            m_historyClient->didNavigateWithNavigationData(*this, store);
-    } else
-        m_loaderClient->didNavigateWithNavigationData(*this, store, *frame);
+    if (m_historyClient && frame->isMainFrame())
+        m_historyClient->didNavigateWithNavigationData(*this, store);
     process().processPool().historyClient().didNavigateWithNavigationData(process().processPool(), *this, store, *frame);
 }
 
@@ -4225,11 +4189,8 @@ void WebPageProxy::didPerformClientRedirect(const String& sourceURLString, const
     MESSAGE_CHECK_URL(sourceURLString);
     MESSAGE_CHECK_URL(destinationURLString);
 
-    if (m_historyClient) {
-        if (frame->isMainFrame())
-            m_historyClient->didPerformClientRedirect(*this, sourceURLString, destinationURLString);
-    } else
-        m_loaderClient->didPerformClientRedirect(*this, sourceURLString, destinationURLString, *frame);
+    if (m_historyClient && frame->isMainFrame())
+        m_historyClient->didPerformClientRedirect(*this, sourceURLString, destinationURLString);
     process().processPool().historyClient().didPerformClientRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
 }
 
@@ -4247,11 +4208,8 @@ void WebPageProxy::didPerformServerRedirect(const String& sourceURLString, const
     MESSAGE_CHECK_URL(sourceURLString);
     MESSAGE_CHECK_URL(destinationURLString);
 
-    if (m_historyClient) {
-        if (frame->isMainFrame())
-            m_historyClient->didPerformServerRedirect(*this, sourceURLString, destinationURLString);
-    } else
-        m_loaderClient->didPerformServerRedirect(*this, sourceURLString, destinationURLString, *frame);
+    if (m_historyClient && frame->isMainFrame())
+        m_historyClient->didPerformServerRedirect(*this, sourceURLString, destinationURLString);
     process().processPool().historyClient().didPerformServerRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
 }
 
@@ -4265,11 +4223,8 @@ void WebPageProxy::didUpdateHistoryTitle(const String& title, const String& url,
 
     MESSAGE_CHECK_URL(url);
 
-    if (m_historyClient) {
-        if (frame->isMainFrame())
-            m_historyClient->didUpdateHistoryTitle(*this, title, url);
-    } else
-        m_loaderClient->didUpdateHistoryTitle(*this, title, url, *frame);
+    if (m_historyClient && frame->isMainFrame())
+        m_historyClient->didUpdateHistoryTitle(*this, title, url);
     process().processPool().historyClient().didUpdateHistoryTitle(process().processPool(), *this, title, url, *frame);
 }
 
@@ -4467,7 +4422,7 @@ void WebPageProxy::webGLPolicyForURL(URL&& url, Messages::WebPageProxy::WebGLPol
             reply(static_cast<uint32_t>(policy));
         });
     } else
-        reply(static_cast<uint32_t>(m_loaderClient->webGLLoadPolicy(*this, url)));
+        reply(static_cast<uint32_t>(WebCore::WebGLLoadPolicy::WebGLAllowCreation));
 }
 
 void WebPageProxy::resolveWebGLPolicyForURL(URL&& url, Messages::WebPageProxy::ResolveWebGLPolicyForURL::DelayedReply&& reply)
@@ -4477,7 +4432,7 @@ void WebPageProxy::resolveWebGLPolicyForURL(URL&& url, Messages::WebPageProxy::R
             reply(static_cast<uint32_t>(policy));
         });
     } else
-        reply(static_cast<uint32_t>(m_loaderClient->resolveWebGLLoadPolicy(*this, url)));
+        reply(static_cast<uint32_t>(WebCore::WebGLLoadPolicy::WebGLAllowCreation));
 }
 #endif // ENABLE(WEBGL)
 
@@ -5873,8 +5828,6 @@ void WebPageProxy::processDidBecomeUnresponsive()
 
     if (m_navigationClient)
         m_navigationClient->processDidBecomeUnresponsive(*this);
-    else
-        m_loaderClient->processDidBecomeUnresponsive(*this);
 }
 
 void WebPageProxy::processDidBecomeResponsive()
@@ -5886,8 +5839,6 @@ void WebPageProxy::processDidBecomeResponsive()
 
     if (m_navigationClient)
         m_navigationClient->processDidBecomeResponsive(*this);
-    else
-        m_loaderClient->processDidBecomeResponsive(*this);
 }
 
 void WebPageProxy::willChangeProcessIsResponsive()
@@ -5965,8 +5916,6 @@ void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
     bool handledByClient = false;
     if (m_navigationClient)
         handledByClient = m_navigationClient->processDidTerminate(*this, reason);
-    else if (reason != ProcessTerminationReason::RequestedByClient)
-        handledByClient = m_loaderClient->processDidCrash(*this);
 
     if (!handledByClient && shouldReloadAfterProcessTermination(reason))
         tryReloadAfterProcessTermination();
@@ -6337,11 +6286,8 @@ void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, bool
 
 #endif
 
-void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Ref<AuthenticationChallengeProxy>&& authenticationChallenge)
+void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t, Ref<AuthenticationChallengeProxy>&& authenticationChallenge)
 {
-    WebFrameProxy* frame = m_process->webFrame(frameID);
-    MESSAGE_CHECK(frame);
-
 #if HAVE(SEC_KEY_PROXY)
     ASSERT(authenticationChallenge->protectionSpace());
     if (authenticationChallenge->protectionSpace()->authenticationScheme() == ProtectionSpaceAuthenticationSchemeClientCertificateRequested) {
@@ -6354,7 +6300,7 @@ void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Ref<
     if (m_navigationClient)
         m_navigationClient->didReceiveAuthenticationChallenge(*this, authenticationChallenge.get());
     else
-        m_loaderClient->didReceiveAuthenticationChallengeInFrame(*this, *frame, authenticationChallenge.get());
+        authenticationChallenge->performDefaultHandling();
 }
 
 void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&& reply)
@@ -6591,9 +6537,7 @@ void WebPageProxy::pageExtendedBackgroundColorDidChange(const Color& backgroundC
 #if ENABLE(NETSCAPE_PLUGIN_API)
 void WebPageProxy::didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString)
 {
-    if (m_navigationClient->didFailToInitializePlugIn(*this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get()))
-        return;
-    m_loaderClient->didFailToInitializePlugin(*this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
+    m_navigationClient->didFailToInitializePlugIn(*this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
 }
 
 void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured)
@@ -6602,9 +6546,7 @@ void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const S
     PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
     auto pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, String(), String(), replacementObscured);
 
-    if (m_navigationClient->didBlockInsecurePluginVersion(*this, pluginInformation.get()))
-        return;
-    m_loaderClient->didBlockInsecurePluginVersion(*this, pluginInformation.get());
+    m_navigationClient->didBlockInsecurePluginVersion(*this, pluginInformation.get());
 }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
@@ -7121,8 +7063,6 @@ void WebPageProxy::navigationGestureDidBegin()
 
     if (m_navigationClient)
         m_navigationClient->didBeginNavigationGesture(*this);
-    else
-        m_loaderClient->navigationGestureDidBegin(*this);
 }
 
 void WebPageProxy::navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem& item)
@@ -7133,8 +7073,6 @@ void WebPageProxy::navigationGestureWillEnd(bool willNavigate, WebBackForwardLis
 
     if (m_navigationClient)
         m_navigationClient->willEndNavigationGesture(*this, willNavigate, item);
-    else
-        m_loaderClient->navigationGestureWillEnd(*this, willNavigate, item);
 }
 
 void WebPageProxy::navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem& item)
@@ -7145,8 +7083,6 @@ void WebPageProxy::navigationGestureDidEnd(bool willNavigate, WebBackForwardList
 
     if (m_navigationClient)
         m_navigationClient->didEndNavigationGesture(*this, willNavigate, item);
-    else
-        m_loaderClient->navigationGestureDidEnd(*this, willNavigate, item);
 }
 
 void WebPageProxy::navigationGestureDidEnd()
index b96703d..a40e902 100644 (file)
@@ -1125,16 +1125,12 @@ void WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame(const String& fil
     static_assert(notFound + 1 == 0, "The following line assumes WTF::notFound equals -1");
     if (m_navigationClient)
         m_navigationClient->didStartLoadForQuickLookDocumentInMainFrame(fileName.substring(fileName.reverseFind('/') + 1), uti);
-    else
-        m_loaderClient->didStartLoadForQuickLookDocumentInMainFrame(fileName.substring(fileName.reverseFind('/') + 1), uti);
 }
 
 void WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData& data)
 {
     if (m_navigationClient)
         m_navigationClient->didFinishLoadForQuickLookDocumentInMainFrame(data);
-    else
-        m_loaderClient->didFinishLoadForQuickLookDocumentInMainFrame(data);
 }
 
 void WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame(const String& fileName)