Diff
Modified: trunk/Source/WebKit/ChangeLog (235397 => 235398)
--- trunk/Source/WebKit/ChangeLog 2018-08-27 20:58:07 UTC (rev 235397)
+++ trunk/Source/WebKit/ChangeLog 2018-08-27 21:00:25 UTC (rev 235398)
@@ -1,5 +1,86 @@
2018-08-27 Alex Christensen <[email protected]>
+ 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 <[email protected]>
+
REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
https://bugs.webkit.org/show_bug.cgi?id=189002
Modified: trunk/Source/WebKit/UIProcess/API/APILoaderClient.h (235397 => 235398)
--- trunk/Source/WebKit/UIProcess/API/APILoaderClient.h 2018-08-27 20:58:07 UTC (rev 235397)
+++ trunk/Source/WebKit/UIProcess/API/APILoaderClient.h 2018-08-27 21:00:25 UTC (rev 235398)
@@ -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 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
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (235397 => 235398)
--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2018-08-27 20:58:07 UTC (rev 235397)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2018-08-27 21:00:25 UTC (rev 235398)
@@ -1042,6 +1042,42 @@
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 @@
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 @@
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 @@
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 @@
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);
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (235397 => 235398)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-08-27 20:58:07 UTC (rev 235397)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-08-27 21:00:25 UTC (rev 235398)
@@ -1270,8 +1270,8 @@
{
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 @@
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 @@
#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
+#endif
findPluginCompletion(pluginLoadPolicy, { });
-#endif
}
#endif // ENABLE(NETSCAPE_PLUGIN_API)
@@ -3375,7 +3371,6 @@
m_pageLoadState.didStartProgress(transaction);
m_pageLoadState.commitChanges();
- m_loaderClient->didStartProgress(*this);
}
void WebPageProxy::didChangeProgress(double value)
@@ -3386,7 +3381,6 @@
m_pageLoadState.didChangeProgress(transaction, value);
m_pageLoadState.commitChanges();
- m_loaderClient->didChangeProgress(*this);
}
void WebPageProxy::didFinishProgress()
@@ -3397,7 +3391,6 @@
m_pageLoadState.didFinishProgress(transaction);
m_pageLoadState.commitChanges();
- m_loaderClient->didFinishProgress(*this);
}
void WebPageProxy::setNetworkRequestsInProgress(bool networkRequestsInProgress)
@@ -3677,11 +3670,8 @@
#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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
if (m_navigationClient)
m_navigationClient->processDidBecomeUnresponsive(*this);
- else
- m_loaderClient->processDidBecomeUnresponsive(*this);
}
void WebPageProxy::processDidBecomeResponsive()
@@ -5886,8 +5839,6 @@
if (m_navigationClient)
m_navigationClient->processDidBecomeResponsive(*this);
- else
- m_loaderClient->processDidBecomeResponsive(*this);
}
void WebPageProxy::willChangeProcessIsResponsive()
@@ -5965,8 +5916,6 @@
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 @@
#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 @@
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 @@
#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 @@
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 @@
if (m_navigationClient)
m_navigationClient->didBeginNavigationGesture(*this);
- else
- m_loaderClient->navigationGestureDidBegin(*this);
}
void WebPageProxy::navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem& item)
@@ -7133,8 +7073,6 @@
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 @@
if (m_navigationClient)
m_navigationClient->didEndNavigationGesture(*this, willNavigate, item);
- else
- m_loaderClient->navigationGestureDidEnd(*this, willNavigate, item);
}
void WebPageProxy::navigationGestureDidEnd()
Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (235397 => 235398)
--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-08-27 20:58:07 UTC (rev 235397)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm 2018-08-27 21:00:25 UTC (rev 235398)
@@ -1125,8 +1125,6 @@
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)
@@ -1133,8 +1131,6 @@
{
if (m_navigationClient)
m_navigationClient->didFinishLoadForQuickLookDocumentInMainFrame(data);
- else
- m_loaderClient->didFinishLoadForQuickLookDocumentInMainFrame(data);
}
void WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame(const String& fileName)