[webkit-changes] [WebKit/WebKit] 6b6c14: Remove ENABLE_CONTENT_FILTERING_IN_NETWORKING_PROCESS

Alex Christensen noreply at github.com
Wed Aug 2 13:01:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b6c1421f0040599ed283d2636c7373fe411142f
      https://github.com/WebKit/WebKit/commit/6b6c1421f0040599ed283d2636c7373fe411142f
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-08-02 (Wed, 02 Aug 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Source/WebCore/loader/ContentFilter.cpp
    M Source/WebCore/loader/ContentFilter.h
    M Source/WebCore/loader/DocumentLoader.cpp
    M Source/WebCore/loader/DocumentLoader.h
    M Source/WebCore/platform/ContentFilterUnblockHandler.h
    M Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
    M Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
    M Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
    M Source/WebKit/NetworkProcess/NetworkResourceLoader.h
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
    M Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
    M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in
    M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in
    M Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm
    M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in
    M Source/WebKit/Shared/LoadParameters.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebProcessProxy.h
    M Source/WebKit/WebProcess/Network/WebMockContentFilterManager.cpp
    M Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
    M Source/WebKit/WebProcess/Network/WebResourceLoader.h
    M Source/WebKit/WebProcess/Network/WebResourceLoader.messages.in
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm

  Log Message:
  -----------
  Remove ENABLE_CONTENT_FILTERING_IN_NETWORKING_PROCESS
https://bugs.webkit.org/show_bug.cgi?id=259737
rdar://113275381

Reviewed by Andy Estes.

It is true everywhere it is meaningful, which is where ENABLE(CONTENT_FILTERING) is true.
For a few years after its introduction, we were still supporting macOS versions where it
was unavailable, but now that is not needed.  Both are still off on tvOS, and this removes
a few Network Extension items from the sandbox that were only used for content filtering,
so it should be no change in behavior.  Just simplifying the code and removing unneeded code.

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/loader/ContentFilter.cpp:
(WebCore::ContentFilter::startFilteringMainResource):
(WebCore::ContentFilter::stopFilteringMainResource):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::url):
(WebCore::ContentFilter::deliverStoredResourceData):
* Source/WebCore/loader/ContentFilter.h:
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::handleContentFilterDidBlock):
(WebCore::DocumentLoader::contentFilterWillHandleProvisionalLoadFailure):
(WebCore::DocumentLoader::contentFilterHandleProvisionalLoadFailure):
* Source/WebCore/loader/DocumentLoader.h:
(WebCore::DocumentLoader::setSubstituteDataFromContentFilter):
* Source/WebCore/platform/ContentFilterUnblockHandler.h:
(WebCore::ContentFilterUnblockHandler::unblockedAfterRequest const):
* Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
(WebCore::ContentFilterUnblockHandler::canHandleRequest const):
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
(WebCore::ContentFilterUnblockHandler::setUnblockedAfterRequest):
* Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h:
* Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::enabled):
(WebCore::NetworkExtensionContentFilter::setHasConsumedSandboxExtensions): Deleted.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequestInternal):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBuffer):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
(WebKit::NetworkResourceLoader::startWithServiceWorker):
* Source/WebKit/NetworkProcess/NetworkResourceLoader.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::processResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveData):
(WebKit::ServiceWorkerFetchTask::didReceiveDataFromPreloader):
(WebKit::ServiceWorkerFetchTask::didFinish):
* Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm:
(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in:
* Source/WebKit/Shared/LoadParameters.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
(WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::hasManagedSessionSandboxAccess const): Deleted.
(WebKit::WebProcessProxy::markHasManagedSessionSandboxAccess): Deleted.
* Source/WebKit/WebProcess/Network/WebMockContentFilterManager.cpp:
* Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:
* Source/WebKit/WebProcess/Network/WebResourceLoader.h:
* Source/WebKit/WebProcess/Network/WebResourceLoader.messages.in:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
(WebKit::WebPage::consumeNetworkExtensionSandboxExtensions): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision):
(WebKit::WebPage::consumeNetworkExtensionSandboxExtensions): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebProcess.cpp:
* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(TEST):

Canonical link: https://commits.webkit.org/266523@main




More information about the webkit-changes mailing list