Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9bfee6dfdf24eb1b9d0a8e3b1f232d9147a99249
https://github.com/WebKit/WebKit/commit/9bfee6dfdf24eb1b9d0a8e3b1f232d9147a99249
Author: Brady Eidson <[email protected]>
Date: 2025-12-12 (Fri, 12 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=304044
Reviewed by Per Arne Vollan and Sihui Liu.
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::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/NetworkProcess.cpp:
(WebKit::NetworkProcess::setSharedParentalControlsURLFilterIfNecessary):
* Source/WebKit/NetworkProcess/NetworkProcess.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.
Canonical link: https://commits.webkit.org/304378@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications