[webkit-changes] [WebKit/WebKit] d2f6b0: Reland 288650 at main: [Site Isolation] Client initia...

Charlie Wolfe noreply at github.com
Thu Jan 16 17:47:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2f6b0a1f35d0895b1e1bd25f7d63706996fa5ad
      https://github.com/WebKit/WebKit/commit/d2f6b0a1f35d0895b1e1bd25f7d63706996fa5ad
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2025-01-16 (Thu, 16 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:
  -----------
  Reland 288650 at main: [Site Isolation] Client initiated cross-site navigations should create a new browsing context
https://bugs.webkit.org/show_bug.cgi?id=286110
rdar://143091422

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/289035@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