Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4b574bf8287b6b5783596850d8a17f300b75a7a2
https://github.com/WebKit/WebKit/commit/4b574bf8287b6b5783596850d8a17f300b75a7a2
Author: Pascoe <[email protected]>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M Source/WebKit/UIProcess/API/APINavigation.cpp
M Source/WebKit/UIProcess/API/APINavigation.h
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SafeBrowsing.mm
Log Message:
-----------
We should wait until we get a safe browsing response before proceeding with
downloads
rdar://173335304
https://bugs.webkit.org/show_bug.cgi?id=311288
Reviewed by Abrar Rahman Protyasha.
We proceed with loading whenever safe browsing responses take too long. This is
fine
for typical webpages as they red screen will show up, but slightly after the
page load
started.
However, for downloads, we have no way to deliver the response late. This patch
starts
to wait for the safe browsing response before proceeding with
PolicyAction::Download.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm
* Source/WebKit/UIProcess/API/APINavigation.cpp:
(API::Navigation::whenSafeBrowsingCheckCompletes):
(API::Navigation::fireSafeBrowsingCheckCompletionCallbacks):
* Source/WebKit/UIProcess/API/APINavigation.h:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::beginSafeBrowsingCheck):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(TEST(SafeBrowsing, DownloadDeferredAndBlockedBySafeBrowsing)):
(TEST(SafeBrowsing, DownloadDeferredAndBlockedBySafeBrowsingPostTimeout)):
(TEST(SafeBrowsing, CleanDownloadProceedsAfterSafeBrowsingCheck)):
(TEST(SafeBrowsing, SubframeDownloadBlockedBySafeBrowsing)):
(TEST(SafeBrowsing, NavigationActionDownloadDeferredBySafeBrowsing)):
Originally-landed-as: 305413.617@rapid/safari-7624.2.5.110-branch
(b74f7274cf3a). rdar://176061243
Canonical link: https://commits.webkit.org/314651@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications