[webkit-changes] [WebKit/WebKit] 8a0ed5: window.open should be able to open a popup with th...

Alex Christensen noreply at github.com
Tue Nov 7 21:04:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a0ed5bd6d4227ddf22da92da40dbf7123104634
      https://github.com/WebKit/WebKit/commit/8a0ed5bd6d4227ddf22da92da40dbf7123104634
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-11-07 (Tue, 07 Nov 2023)

  Changed paths:
    A LayoutTests/http/tests/site-isolation/iframe-and-window-open-expected.txt
    A LayoutTests/http/tests/site-isolation/iframe-and-window-open.html
    A LayoutTests/http/tests/site-isolation/resources/post-message-to-opener.html
    M Source/WebCore/loader/DocumentLoader.cpp
    M Source/WebCore/loader/DocumentLoader.h
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/FrameLoader.h
    M Source/WebCore/loader/FrameLoaderTypes.h
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/ProvisionalPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp
    M Source/WebKit/WebProcess/WebPage/WebDocumentLoader.h
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.h
    M Source/WebKitLegacy/mac/WebView/WebDocumentLoaderMac.h
    M Source/WebKitLegacy/mac/WebView/WebDocumentLoaderMac.mm

  Log Message:
  -----------
  window.open should be able to open a popup with the same domain as an existing site-isolated iframe
https://bugs.webkit.org/show_bug.cgi?id=264323
rdar://118015550

Reviewed by Pascoe.

If we already have a RemotePageProxy communicating with a WebPage in the right process, use it instead
of making a new one and getting confused about which one to use.  If we do this, we need to grant that
process cookie access because it may have a new first party.

In addition, WebFrame::documentLoaderDetached was sending WebPageProxy::DidDestroyNavigation which was
destroying the navigation while it was continuing in another process, which caused assertions.  To fix
this, don't send this message if the load is continuing in another process.

* LayoutTests/http/tests/site-isolation/iframe-and-window-open-expected.txt: Added.
* LayoutTests/http/tests/site-isolation/iframe-and-window-open.html: Added.
* LayoutTests/http/tests/site-isolation/resources/post-message-to-opener.html: Added.
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
(WebKit::ProvisionalPageProxy::needsCookieAccessAddedInNetworkProcess const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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




More information about the webkit-changes mailing list