[webkit-changes] [WebKit/WebKit] c5d587: [Site Isolation] Client initiated cross-site navig...
Charlie Wolfe
noreply at github.com
Thu Jan 9 02:17:54 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c5d587b303c05c1f3a7b988a8541497d03897f12
https://github.com/WebKit/WebKit/commit/c5d587b303c05c1f3a7b988a8541497d03897f12
Author: Charlie Wolfe <charliew at apple.com>
Date: 2025-01-09 (Thu, 09 Jan 2025)
Changed paths:
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Client initiated cross-site navigations should create a new browsing context
https://bugs.webkit.org/show_bug.cgi?id=285589
rdar://142539230
Reviewed by Alex Christensen.
An opened window should not have access to its opener after the opener has begun a client-initiated
cross-site navigation. This matches behavior with site isolation disabled.
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
If we are navigating away from a page with an opener and about to switch browsing contexts we do not want
to add the previous page.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::createNewPage):
If a new window is opened with an opener, explicitly share the browsing context to the new page. This was
revealed by this change because we now switch browsing contexts between each layout test.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
((ProcessSwap, SameSiteWindowWithOpenerNavigateToFile)):
Expecting the opener to be preserved after loading a file URL in the opened webView with loadRequest was
incorrect.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, LoadRequestOnOpenerWebView)):
(TestWebKitAPI::TEST(SiteIsolation, LoadRequestOnOpenedWebView)):
Canonical link: https://commits.webkit.org/288650@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