Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6c3c6413ec831ba8a424de99ed0c7b786a377ccd
https://github.com/WebKit/WebKit/commit/6c3c6413ec831ba8a424de99ed0c7b786a377ccd
Author: Basuke Suzuki <[email protected]>
Date: 2026-03-20 (Fri, 20 Mar 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/history/dynamic-cross-site-iframe-does-not-add-history-entry-expected.txt
A
LayoutTests/http/tests/site-isolation/history/dynamic-cross-site-iframe-does-not-add-history-entry.html
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] Dynamically created cross-site iframes should not add
back/forward list entries
https://bugs.webkit.org/show_bug.cgi?id=310369
rdar://161250444
Reviewed by Brady Eidson.
When a dynamically created iframe (still at about:blank) navigates to a
cross-site URL under site isolation, it was creating a duplicate
back/forward list entry. This happened because isPendingInitialHistoryItem
was only set for isInitialFrameSrcLoad navigations (<iframe src="...">),
not for iframes navigated from about:blank via JavaScript.
The fix adds isShowingInitialAboutBlank state to WebFrameProxy, which is
initialized to true and cleared on the first non-about:blank commit. This
is used alongside isInitialFrameSrcLoad to determine whether a frame's
first cross-site navigation should be registered as a child item in the
back/forward list tree rather than creating a new entry.
Test:
http/tests/site-isolation/history/dynamic-cross-site-iframe-does-not-add-history-entry.html
*
LayoutTests/http/tests/site-isolation/history/dynamic-cross-site-iframe-does-not-add-history-entry-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/history/dynamic-cross-site-iframe-does-not-add-history-entry.html:
Added.
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
* Source/WebKit/UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::isShowingInitialAboutBlank const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Canonical link: https://commits.webkit.org/309666@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications