Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eb56cc4bf825d449e4c0673a2a4fecaa8dbd6847
      
https://github.com/WebKit/WebKit/commit/eb56cc4bf825d449e4c0673a2a4fecaa8dbd6847
  Author: Alex Christensen <[email protected]>
  Date:   2023-11-16 (Thu, 16 Nov 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  window.open should be able to handle redirects with site isolation enabled
https://bugs.webkit.org/show_bug.cgi?id=264970
rdar://118522568

Reviewed by Pascoe.

3 things were needed to make this work correctly.

1. In WebPageProxy::decidePolicyForNavigationAction we need to get the correct
   frameProcessBeforeNavigation whether we use a ProvisionalFrameProxy (for 
non-main frame
   site-isolated navigation) or a ProvisionalPageProxy (for main frame 
site-isolated
   navigation like window.open).
2. In ProvisionalPageProxy::didCreateMainFrame we need to call 
didReceiveServerRedirectForProvisionalLoad
   instead of didStartProvisionalLoad because after multiple HTTP redirects we 
make a ProvisionalPageProxy
   for each redirect.  Future work is already scheduled to fix this, but until 
then we can make the
   FrameLoadState have the correct state by adding some site-isolation specific 
logic here.
3. In WebPageProxy::addOpenedRemotePageProxy we need to remove an assertion 
until that same work is
   complete because we currently make a RemotePageProxy to communicate with 
each web content process
   along an HTTP redirect chain.

* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::addOpenedRemotePageProxy):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::openerAndOpenedViews):
(TestWebKitAPI::TEST):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to