Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f57d285d1e5a72ea6f5120ddead75bba72d2b64e
      
https://github.com/WebKit/WebKit/commit/f57d285d1e5a72ea6f5120ddead75bba72d2b64e
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-03-18 (Wed, 18 Mar 2026)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/FrameLoader.h
    M Source/WebCore/loader/NavigationScheduler.cpp
    M Source/WebKit/UIProcess/WebBackForwardList.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
    M Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.h
    M Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm

  Log Message:
  -----------
  [Site Isolation] Enable back/forward navigation via UIProcess when site 
isolation is active
https://bugs.webkit.org/show_bug.cgi?id=309907
rdar://172495046

Reviewed by Charlie Wolfe.

Enable useUIProcessForBackForwardItemLoading when site isolation is enabled,
so that the UIProcess resolves back/forward list items and drives process
swaps correctly during history traversals.

Key changes:
- Automatically set useUIProcessForBackForwardItemLoading when
  siteIsolationEnabled is true.
- Handle history.go(0) as a reload early, before entering the async
  back/forward path.
- Cancel pending async back-forward navigation on fragment scrolls.
- Update back/forward list FrameIdentifiers during process swaps in
  commitProvisionalPage so subsequent navigations find the right frames.
- Fall back to mainFrameItem when a parentFrameID lookup fails after
  session restore, where original frame identifiers are unavailable.
- Clear async back-forward navigation state before loading the resolved
  HistoryItem so frame completion tracking works correctly.
- Add waitForAndCheckFrameTreesInProcesses() test helper that polls
  until cross-origin subframe process swaps complete.

No new tests, covered by existing site-isolation back/forward tests.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
* Source/WebCore/loader/NavigationScheduler.cpp:
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::findFrameStateInItem):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitProvisionalPage):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForBackForwardNavigationAction):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, NavigationWithIFrames)):
(TestWebKitAPI::TEST(SiteIsolation, GoBackToPageWithIframe)):
(TestWebKitAPI::TEST(SiteIsolation, ProcessTerminationReason)):
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[TestNavigationDelegate _webView:didFinishLoadWithRequest:inFrame:]):
(-[TestNavigationDelegate waitForDidFinishLoadInSubframe]):

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



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

Reply via email to