Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8411b9a979791c55b2407d632f3f20bec7f2aa18
      
https://github.com/WebKit/WebKit/commit/8411b9a979791c55b2407d632f3f20bec7f2aa18
  Author: Cameron McCormack <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    A 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-cross-site-expected.txt
    A 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-cross-site.html
    A 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-same-site-expected.txt
    A 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-same-site.html
    A 
LayoutTests/http/tests/navigation/resources/page-cache-noopener-window.html
    A LayoutTests/http/tests/navigation/resources/report-pageshow-persisted.html
    R 
LayoutTests/http/wpt/css/css-view-transitions/navigation/old_vt_promises_bfcache-expected.txt
    R 
LayoutTests/http/wpt/css/css-view-transitions/navigation/old_vt_promises_bfcache.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/popups/noopener-opener-no-openee-yes-same.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/popups/noopener-opener-no-openee-yes-same.https.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/oac-broadcast-popup.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/oac-broadcast-popup.html.headers
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-popup.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-popup.html.headers
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https.html.headers
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https.html
    A 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https.html.headers
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios-site-isolation/TestExpectations
    M LayoutTests/platform/mac-site-isolation/TestExpectations
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/broadcast-channel-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/dedicated-worker-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-1-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-2-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-cors-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-redirects-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/shared-worker-active-client.window-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/shared-worker-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/events-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/focus-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/pushstate.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-client-postmessage.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-clients-claim.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-clients-matchall.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-controlled-after-restore.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-unregister.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/storage-events-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/timers-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/abort.tentative.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/held.tentative.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/release-across-thread.tentative.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/release.tentative.https-expected.txt
    R 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/sharedworker-multiple.tentative.https-expected.txt
    M LayoutTests/platform/win/TestExpectations
    M Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
    M Source/WebKit/UIProcess/API/APIPageConfiguration.h
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Make noopener windows eligible for the bfcache
https://bugs.webkit.org/show_bug.cgi?id=324610
rdar://187846044

Reviewed by Sihui Liu.

With Site Isolation enabled, noopener windows are not eligible for the
bfcache, but they should be.

A window opened with noopener has openedByDOM() set, so
ProvisionalPageProxy reuses its main frame across a process swap. Since
321195@main, suspendCurrentPageIfPossible declines to suspend a page
when the provisional page is committing into that page's main frame.
Such a window is therefore never suspended, and a cross-site navigation
does not use the bfcache.

Reusing the main frame keeps a window reference held in another process
valid across the swap. Only a page in the same browsing context group
can hold such a reference, so condition the reuse on the group holding
more than one page. openedByDOM() was the wrong check, since it stays
set whether or not anything can still reach the window. The new
condition mirrors the browsing context group check in
suspendCurrentPageIfPossible.

A noopener window opened at a same-site URL was getting the opener's
browsing context group because createNewPage set relatedPage on its
configuration, and preferredBrowsingContextGroup returns the related
page's group. relatedPage was set there so that the window would load in
the process of the window that opened it. Sharing a process and sharing
a browsing context group are separate concerns, so createNewPage records
the opener's process on the configuration instead, and createWebPage
uses that process when the two pages are able to share a process.
_setRelatedWebView: still sets relatedPage, so the behavior added in
306438@main is unchanged.

createNewPage copies the opening page's configuration, so it clears any
process recorded there before deciding whether to record one for the new
window. Otherwise a window opened from a window that was itself opened
same-site with noopener would inherit a process from further up the
chain, which placed a cross-site noopener window in the wrong process,
and without Site Isolation placed a window opened with an opener outside
its opener's process.

processForNavigationInternal decided whether to keep a noopener window
in the opener's process by comparing the navigation target against the
related page's current URL. It now compares the target against the site
the window was opened at.

canShareProcessWithOpener declines the opener's process when that
process is the browsing context group's shared process. A shared process
only hosts subframes, and creating a FrameProcess for it in a group that
does not have one would dedicate it to a single site. A window opened
from a frame in the shared process therefore loads in a process of its
own. CrossSiteIframeOpenWindowWithBlobURL expected such a window to
share the shared process with the frame that opened it, and now expects
three distinct processes.

To test these changes, we use the historical agent cluster key map.
The browsing context group a noopener window lands in is observable with
or without Site Isolation: before these changes, a same-origin noopener
window was inheriting the opener's origin-keying decision rather than
making its own. noopener-opener-no-openee-yes-same.https.html is added
to test this, modeled on other tests in its directory.

window-noopener-failure.https.html and window-opener-success.https.html
test the agent cluster requirement for SharedArrayBuffer, which we were
already correctly doing before these changes (but were written during
patch development and seemed worth keeping).

hasPageOpenedByMainFrame() had no other callers and is removed.

The http/wpt copy of old_vt_promises_bfcache.html, whose failure
prompted this investigation, is removed. It existed so that
UsesBackForwardCache could be applied to it, and 300920@main turned the
bfcache on by default in WebKitTestRunner and deleted other similar
copies, but missed this one. Because http/wpt tests are served from
localhost rather than the WPT server's browser_host, its
originSameOrigin put pageB on another site, which is why it was failing.
The imported test under LayoutTests/imported/w3c/web-platform-tests/
runs and has been passing with and without Site Isolation.

The two SharedArrayBuffer tests are skipped on GLib, which skips the
other window-* tests in that directory too.

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
       http/tests/navigation/page-cache-noopener-window-opened-cross-site.html
       http/tests/navigation/page-cache-noopener-window-opened-same-site.html
       
imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/popups/noopener-opener-no-openee-yes-same.https.html
       
imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https.html
       
imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https.html

* 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-cross-site-expected.txt:
 Added.
* 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-cross-site.html:
 Added.
* 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-same-site-expected.txt:
 Added.
* 
LayoutTests/http/tests/navigation/page-cache-noopener-window-opened-same-site.html:
 Added.
* LayoutTests/http/tests/navigation/resources/page-cache-noopener-window.html: 
Added.
* LayoutTests/http/tests/navigation/resources/report-pageshow-persisted.html: 
Added.
* 
LayoutTests/http/wpt/css/css-view-transitions/navigation/old_vt_promises_bfcache-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/css/css-view-transitions/navigation/old_vt_promises_bfcache.html:
 Removed.
* 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/popups/noopener-opener-no-openee-yes-same.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/popups/noopener-opener-no-openee-yes-same.https.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/oac-broadcast-popup.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/resources/oac-broadcast-popup.html.headers:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-popup.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-popup.html.headers:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-noopener-failure.https.html.headers:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-opener-success.https.html.headers:
 Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/broadcast-channel-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/dedicated-worker-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-1-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-2-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-cors-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/inflight-fetch-redirects-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/shared-worker-active-client.window-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/eligibility/shared-worker-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/events-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/focus-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/pushstate.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-client-postmessage.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-clients-claim.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-clients-matchall.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-controlled-after-restore.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/service-worker-unregister.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/storage-events-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/timers-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/abort.tentative.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/held.tentative.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/release-across-thread.tentative.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/release.tentative.https-expected.txt:
 Removed.
* 
LayoutTests/platform/mac-site-isolation/imported/w3c/web-platform-tests/web-locks/bfcache/sharedworker-multiple.tentative.https-expected.txt:
 Removed.
* LayoutTests/platform/win/TestExpectations:
* Source/WebKit/UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::preferredProcessFromOpener const):
* Source/WebKit/UIProcess/API/APIPageConfiguration.h:
(API::PageConfiguration::setPreferredProcessFromOpener):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::shouldReuseMainFrameOnProcessSwap const):
(WebKit::WebPageProxy::hasPageOpenedByMainFrame const): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::canShareProcessWithOpener):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::processForNavigationInternal):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, OpenWithNoopenerFromWindowOpenedWithNoopener)):
(TestWebKitAPI::testOpenWithOpenerFromNoopenerWindow):
(TestWebKitAPI::(SiteIsolation, OpenWithOpenerFromNoopenerWindow)):
(TestWebKitAPI::(SiteIsolation, 
OpenWithOpenerFromNoopenerWindowWithoutSiteIsolation)):
(TestWebKitAPI::(SiteIsolation, CrossSiteIframeOpenWindowWithBlobURL)):

Canonical link: https://commits.webkit.org/321634@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to