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

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/history/cross-site-iframe-does-not-add-history-entry-expected.txt
    A 
LayoutTests/http/tests/site-isolation/history/cross-site-iframe-does-not-add-history-entry.html
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  [Site Isolation] Cross-site subframe navigations should preserve 
lockBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=310326
rdar://168640900

Reviewed by Brady Eidson.

When site isolation triggers a process swap for a cross-site subframe
navigation, the lockBackForwardList flag was not correctly propagated to
the new process. The site isolation path in continueNavigationInNewProcess
used navigation.backForwardFrameLoadType() to determine lockBackForwardList,
but that field is only set for back/forward navigations and is nullopt for
regular subframe loads. This caused lockBackForwardList to always be No,
resulting in extra back/forward list entries being created for cross-site
iframe loads.

The fix uses navigation.lockBackForwardList() directly, matching all other
code paths. For initial frame src loads, lockBackForwardList is kept as No
so that the isPendingInitialHistoryItem mechanism in backForwardAddItemShared
can properly register the child frame's initial content in the back/forward
list tree and clear the pending flag for subsequent navigations.

Test: 
http/tests/site-isolation/history/cross-site-iframe-does-not-add-history-entry.html
* 
LayoutTests/http/tests/site-isolation/history/cross-site-iframe-does-not-add-history-entry-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/history/cross-site-iframe-does-not-add-history-entry.html:
 Added.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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



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

Reply via email to