diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp index 24e9d0eecb573..105463225d611 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp @@ -75,6 +75,7 @@ #include "WebsiteDataStoreParameters.h" #include #include +#include #include #include #include @@ -1441,6 +1442,11 @@ void NetworkConnectionToWebProcess::installMockContentFilter(WebCore::MockConten } #endif +void NetworkConnectionToWebProcess::registerURLSchemeAsHandledBySchemeHandler(const String& scheme) +{ + WebCore::LegacySchemeRegistry::registerURLSchemeAsHandledBySchemeHandler(scheme); +} + } // namespace WebKit #undef CONNECTION_RELEASE_LOG diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h index 35deb0171bee0..0828bb7f1fe1f 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h @@ -239,6 +239,8 @@ class NetworkConnectionToWebProcess void registerURLSchemesAsCORSEnabled(Vector&& schemes); + void registerURLSchemeAsHandledBySchemeHandler(const String& scheme); + void cookiesForDOM(const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::IncludeSecureCookies, WebCore::ShouldAskITP, WebCore::ShouldRelaxThirdPartyCookieBlocking, CompletionHandler&&); void setCookiesFromDOM(const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, WebCore::FrameIdentifier, WebCore::PageIdentifier, WebCore::ShouldAskITP, const String&, WebCore::ShouldRelaxThirdPartyCookieBlocking); void cookieRequestHeaderFieldValue(const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, std::optional, std::optional, WebCore::IncludeSecureCookies, WebCore::ShouldAskITP, WebCore::ShouldRelaxThirdPartyCookieBlocking, CompletionHandler&&); diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in index 2ab3c78324601..4be02327c964f 100644 --- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in +++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in @@ -117,4 +117,5 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver { #if ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS) InstallMockContentFilter(WebCore::MockContentFilterSettings settings) #endif + RegisterURLSchemeAsHandledBySchemeHandler(String scheme) } diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp index b8ec4d02e6713..540cd69c45a7a 100644 --- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp @@ -7285,6 +7285,8 @@ void WebPage::registerURLSchemeHandler(WebURLSchemeHandlerIdentifier handlerIden WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled(scheme); auto schemeResult = m_schemeToURLSchemeHandlerProxyMap.add(scheme, WebURLSchemeHandlerProxy::create(*this, handlerIdentifier)); m_identifierToURLSchemeHandlerProxyMap.add(handlerIdentifier, schemeResult.iterator->value.get()); + + WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterURLSchemeAsHandledBySchemeHandler { scheme }, 0); } void WebPage::urlSchemeTaskWillPerformRedirection(WebURLSchemeHandlerIdentifier handlerIdentifier, WebCore::ResourceLoaderIdentifier taskIdentifier, ResourceResponse&& response, ResourceRequest&& request, CompletionHandler&& completionHandler)