Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b60dfd450a090c779656560aaaa42363a3fb099
      
https://github.com/WebKit/WebKit/commit/9b60dfd450a090c779656560aaaa42363a3fb099
  Author: Rupin Mittal <[email protected]>
  Date:   2026-02-25 (Wed, 25 Feb 2026)

  Changed paths:
    M LayoutTests/platform/ios-site-isolation/TestExpectations
    M LayoutTests/platform/mac-site-isolation/TestExpectations
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebCore/loader/EmptyFrameLoaderClient.h
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/LocalFrameLoaderClient.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm

  Log Message:
  -----------
  [Site Isolation] COOP test 
iframe-popup-same-origin-allow-popups-to-unsafe-none.https.html?7-8 is failing
https://bugs.webkit.org/show_bug.cgi?id=308584
rdar://171112061

Reviewed by Charlie Wolfe.

In this test, an iframe that is same-site to the main frame uses a form 
submission
to open a popup that is cross-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 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 LocalFrame. This LocalFrame is created when the load commits and we swap the
RemoteFrame to a LocalFrame. We set the LocalFrame's name to the RemoteFrame's
name. (We swap and set the name in WebFrame::commitProvisionalFrame). Turns out
that the RemoteFrame's name is null.

The RemoteFrame is created in WebPage::create when we make the Page (which calls
Page::createMainFrame) and its name is set in WebPage::create as well. The issue
is that we're passing in an null openedMainFrameName. We fix this by sending the
correct openedMainFrameName from FrameLoader::continueAfterNewWindowPolicy to
WebLocalFrameLoaderClient::dispatchCreatePage so that it may send that (instead 
of
a null String) to WebChromeClient::createWindow and then to WebPage::create.

We fixed two similar tests in https://commits.webkit.org/307929@main. This fix
fixes those two tests as well and is a better fix than the one implemented 
there.
So we revert that fix.

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/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchCreatePage):
* Source/WebCore/loader/EmptyFrameLoaderClient.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
* Source/WebCore/loader/LocalFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchCreatePage):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchCreatePage):

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



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

Reply via email to