Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b1a58c0a3e7f5e5401d157e71c33f6eef21511be
https://github.com/WebKit/WebKit/commit/b1a58c0a3e7f5e5401d157e71c33f6eef21511be
Author: Zak Ridouh <[email protected]>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/history/back-forward-item-at-index-cross-process-frame-id-expected.txt
A
LayoutTests/http/tests/site-isolation/history/back-forward-item-at-index-cross-process-frame-id.html
A
LayoutTests/http/tests/site-isolation/history/resources/back-forward-item-at-index-frame-id-probe.html
A LayoutTests/ipc/back-forward-item-at-index-frame-id-expected.txt
A LayoutTests/ipc/back-forward-item-at-index-frame-id.html
A LayoutTests/ipc/resources/back-forward-item-at-index-subframe.html
M Source/WebKit/UIProcess/WebBackForwardList.cpp
M Source/WebKit/UIProcess/WebBackForwardList.swift
M Source/WebKit/UIProcess/WebBackForwardListSwiftUtilities.h
Log Message:
-----------
[Site Isolation] backForwardItemAtIndexForWebContent returns main frame state
for any unrecognized frameID
https://bugs.webkit.org/show_bug.cgi?id=322135
rdar://172058204
Reviewed by Alex Christensen.
If the entry had no item for the requested frameID,
backForwardItemAtIndexForWebContent()
replied with the entry's main frame state. A subframe missing from that entry,
an unknown
frameID, or another page's frame all got this page's main frame FrameState.
Both it and backForwardAllItems() now reply with nothing unless the frameID
names a frame of
this page. Only a main frame still falls back to the entry's main frame state,
because entries
can lack the main frame's current ID after a session restore or a process swap.
The frame check is not a MESSAGE_CHECK. Under site isolation a subframe process
names the main
frame, which it does not host, whenever BackForwardController is called without
a frameID. The
frame can also be destroyed while a synchronous request naming it is in flight.
Both the C++ and Swift implementations are changed.
Tests:
http/tests/site-isolation/history/back-forward-item-at-index-cross-process-frame-id.html
ipc/back-forward-item-at-index-frame-id.html
*
LayoutTests/http/tests/site-isolation/history/back-forward-item-at-index-cross-process-frame-id-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/history/back-forward-item-at-index-cross-process-frame-id.html:
Added.
*
LayoutTests/http/tests/site-isolation/history/resources/back-forward-item-at-index-frame-id-probe.html:
Added.
* LayoutTests/ipc/back-forward-item-at-index-frame-id-expected.txt: Added.
* LayoutTests/ipc/back-forward-item-at-index-frame-id.html: Added.
* LayoutTests/ipc/resources/back-forward-item-at-index-subframe.html: Added.
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::frameOnPage):
(WebKit::WebBackForwardList::backForwardAllItems):
(WebKit::WebBackForwardList::backForwardItemAtIndexForWebContent):
* Source/WebKit/UIProcess/WebBackForwardList.swift:
* Source/WebKit/UIProcess/WebBackForwardListSwiftUtilities.h:
(webFrameForFrameID):
Canonical link: https://commits.webkit.org/321961@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications