[webkit-changes] [WebKit/WebKit] 4b59b2: Handle non-provisional load failure with site isol...
Alex Christensen
noreply at github.com
Wed Sep 18 19:29:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4b59b2e31035562e0a562820edec38c66c0448c2
https://github.com/WebKit/WebKit/commit/4b59b2e31035562e0a562820edec38c66c0448c2
Author: Alex Christensen <achristensen at apple.com>
Date: 2024-09-18 (Wed, 18 Sep 2024)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h
M Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm
M Source/WebKit/UIProcess/FrameLoadState.cpp
M Source/WebKit/UIProcess/FrameLoadState.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxyInternals.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
Handle non-provisional load failure with site isolation in PLT
https://bugs.webkit.org/show_bug.cgi?id=279921
rdar://136251106
Reviewed by Ryosuke Niwa.
Most frame load failures are provisional load failures, but occasionally we get a non-provisional
load failure. For various historical reasons, one of the ways this can be hit is if there's a
cross-site iframe loaded and the response of the main resource has this HTTP header:
Content-Security-Policy: frame-ancestors 'none'
When that happens, it exposed two issues. First, we were not notifying the parent frame of the
load completion, so the main frame's load event never happened. Second, the new accounting of
the number of loading frames in PageLoadTimingFrameLoadStateObserver was not listening for
didFailLoad calls. This PR fixes both, and I verified this fixes the subtest of PLT with site
isolation enabled.
* Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h:
* Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm:
(WebKit::SubFrameSOAuthorizationSession::didFinishLoad):
* Source/WebKit/UIProcess/FrameLoadState.cpp:
(WebKit::FrameLoadState::didFailProvisionalLoad):
(WebKit::FrameLoadState::didFinishLoad):
(WebKit::FrameLoadState::didFailLoad):
* Source/WebKit/UIProcess/FrameLoadState.h:
(WebKit::FrameLoadStateObserver::didFailProvisionalLoad):
(WebKit::FrameLoadStateObserver::didFailLoad):
(WebKit::FrameLoadStateObserver::didFinishLoad):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailLoadForFrame):
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, RedirectToCSP)):
Canonical link: https://commits.webkit.org/283886@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list