Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27241564f95710442bd89874714d41f33ca757b8
https://github.com/WebKit/WebKit/commit/27241564f95710442bd89874714d41f33ca757b8
Author: Rupin Mittal <[email protected]>
Date: 2026-02-20 (Fri, 20 Feb 2026)
Changed paths:
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/loader/FrameLoader.cpp
Log Message:
-----------
[Site Isolation] 2 COOP tests in
iframe-popup-same-origin-allow-popups-to-unsafe-none.https.html are failing
https://bugs.webkit.org/show_bug.cgi?id=307631
rdar://170194306
Reviewed by Charlie Wolfe.
In these tests, an iframe that is cross-site to the mainframe uses an anchor
element to open a popup that is same-site to the mainframe. The iframe's COOP
is same-origin-allow-popups and the popup's COOP is unsafe-none. The opener
relationship should be preserved and since the anchor element specified a
target,
the opened popup window should have a name.
Our issue is that there is no name.
The name property is returned by LocalDOMWindow::name(), which gets it from
the Frame. Turns out that when we set the specified name in
WebFrame::commitProvisionalFrame by calling FrameTree::setSpecifiedName(),
we are setting a null string because we never set the correct specified name
on the WebFrame::m_coreFrame's FrameTree.
Currently, the name is set on the newly created WebFrame in
FrameLoader::continueLoadAfterNewWindowPolicy. This sets the name on the frame
in the opener process (the iframe's web process). With site isolation disabled,
this is enough because there is only one web process and so there is only one
frame on which we need to set the name. But with site isolation enabled, we also
need to set the name on this frame's counterpart in the other web process (the
main frame's web process) since that's where we'll access the name from later.
So we fix this by ensuring that when we set the name on the frame in the
opener's
web process, we also broadcast this name change to all other web processes.
These tests now pass when run with site isolation enabled.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
Canonical link: https://commits.webkit.org/307929@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications