Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 500826177f6a860b62e7270da16f27ed71bc578e
      
https://github.com/WebKit/WebKit/commit/500826177f6a860b62e7270da16f27ed71bc578e
  Author: Brady Eidson <[email protected]>
  Date:   2025-12-11 (Thu, 11 Dec 2025)

  Changed paths:
    M Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h
    M Source/WebCore/platform/cocoa/ParentalControlsURLFilter.h
    M Source/WebCore/platform/cocoa/ParentalControlsURLFilter.mm
    M Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
    M Source/WebKit/NetworkProcess/Downloads/PendingDownload.h
    M Source/WebKit/NetworkProcess/NetworkProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkProcess.h
    M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
    M Source/WebKit/Shared/ios/WebParentalControlsURLFilter.h
    M Source/WebKit/Shared/ios/WebParentalControlsURLFilter.mm

  Log Message:
  -----------
  WebKit managed downloads should consult the Screen Time web allow/block list
rdar://162877418
https://bugs.webkit.org/show_bug.cgi?id=303971

Reviewed by Per Arne Vollan.

When a navigation occurs, WebKit will automatically subject that navigation to 
a few different
methods of content filtering defined by the platform.

One such method of filtering is Screen Time's parental controls based on URL 
block/allow lists.

When a navigation turns into a download, then further redirects of the URL 
should continue to
consult the URL block/allow lists.

The same is true for downloads started directly via WKWebView/WKDownload APIs.

Most of the change here is in PendingDownload, which always sits between the 
actual network load
and clients being informed of download-related decisions and progress.

PendingDownload will now consult its initial URL against the block/allow lists, 
as well as any redirects.

If it is informed that the URL is blocked, it will cancel the network load and 
schedule its own
failure with an appropriate error to notify the WebKit API client.

* Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h:
* Source/WebCore/platform/cocoa/ParentalControlsURLFilter.h:

* Source/WebCore/platform/cocoa/ParentalControlsURLFilter.mm:
(WebCore::ParentalControlsURLFilter::setSharedParentalControlsURLFilterIfNecessary):
(WebCore::ParentalControlsURLFilter::isURLAllowed):
(WebCore::ParentalControlsURLFilter::isURLAllowedImpl):

* Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload):
(WebKit::PendingDownload::willSendRedirectedRequest):
(WebKit::PendingDownload::messageSenderDestinationID const):
(WebKit::PendingDownload::blockDueToContentFilter):
* Source/WebKit/NetworkProcess/Downloads/PendingDownload.h:

* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startContentFiltering):
(WebKit::setSharedParentalControlsURLFilterIfNecessary): Deleted.

* Source/WebKit/Shared/ios/WebParentalControlsURLFilter.h:
* Source/WebKit/Shared/ios/WebParentalControlsURLFilter.mm:
(WebKit::WebParentalControlsURLFilter::isURLAllowedImpl):
(WebKit::WebParentalControlsURLFilter::isURLAllowed): Deleted.
(WebKit::WebParentalControlsURLFilter::allowURL): Deleted.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to