Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 866e9a21fa2c5cf672e970ca241b6e06b544c67b
      
https://github.com/WebKit/WebKit/commit/866e9a21fa2c5cf672e970ca241b6e06b544c67b
  Author: Anthony Tarbinian <[email protected]>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-main-page-expected.txt
    A 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-main-page.html
    A 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe.html
    A 
LayoutTests/http/tests/site-isolation/resources/frame-child-navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe.html
    A 
LayoutTests/http/tests/site-isolation/scrolling/basic-mouse-wheel-scrolling-expected.txt
    A 
LayoutTests/http/tests/site-isolation/scrolling/basic-mouse-wheel-scrolling.html
    A 
LayoutTests/http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation-expected.txt
    A 
LayoutTests/http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebKit/Shared/ProvisionalFrameCreationParameters.h
    M Source/WebKit/Shared/ProvisionalFrameCreationParameters.serialization.in
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.h
    M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] about:blank should inherit navigator's origin
https://bugs.webkit.org/show_bug.cgi?id=302102
rdar://160706600

Reviewed by Alex Christensen.

Re-landing #52845 since it was reverted
after breaking scrolling with site isolation.
See https://bugs.webkit.org/show_bug.cgi?id=303451

The issue with scrolling arose because I created a helper method to wrap
the creation of ProvisionalFrameCreationParameters. In one of the calls
of the helper method, I created a ProvisionalFrameCreationParameters where
the layerHostingContextIdentifier field came from 
WebFrameProxy::layerHostingContextIdentifier().
However, in the original code there was an instance where 
layerHostingContextIdentifier
was set to std::nullopt. My helper method didn't account for this use case,
and would always set layerHostingContextIdentifier to 
WebFrameProxy::layerHostingContextIdentifier().

Now, WebFrameProxy::provisionalFrameCreationParameters will take an additional
argument to specify the layerHostingContextIdentifier.

Also, adding a new test 
(http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation.html)
which will navigate the page to a cross-origin site and attempt to scroll.

Original commit message:

        If an iframe is navigated to about:blank, it should inherit the origin
        of whoever initiated the navigation.

        With site isolation, this means that the about:blank iframe needs to
        be in the same process as the navigator. If the iframe was previously
        in a different origin than the navigator, this might require a process
        swap.

        This patch also attempts to perform these loads to about:blank 
"immediately"
        by committing a provisional frame right after creating one since 
about:blank
        iframes don't have any network resources to load.

Tests: 
http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-main-page.html
       
http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe.html
       http/tests/site-isolation/scrolling/scroll-down-key.html
       
http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation.html
       Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

* 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-main-page-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-main-page.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/resources/frame-child-navigate-to-about-blank-from-cross-origin-initiated-by-parent-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/scrolling/basic-mouse-wheel-scrolling-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/scrolling/basic-mouse-wheel-scrolling.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/scrolling/scrolling-after-cross-origin-navigation.html:
 Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/Shared/ProvisionalFrameCreationParameters.h:
* Source/WebKit/Shared/ProvisionalFrameCreationParameters.serialization.in:
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.h:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
(WebKit::WebFrameProxy::provisionalFrameCreationParameters):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createProvisionalFrame):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, 
MainPageNavigatesCrossOriginIframeToAboutBlank)):
(TestWebKitAPI::(SiteIsolation, 
ChildIframeNavigatesCrossOriginGrandchildIframeToAboutBlank)):

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



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

Reply via email to