Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2878ab233c05bacd05b78e87d60ebf54de756987
https://github.com/WebKit/WebKit/commit/2878ab233c05bacd05b78e87d60ebf54de756987
Author: Qianlang Chen <[email protected]>
Date: 2026-03-16 (Mon, 16 Mar 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/inspector/target/target-cross-origin-page-navigation-expected.txt
A
LayoutTests/http/tests/site-isolation/inspector/target/target-cross-origin-page-navigation.html
M Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
Log Message:
-----------
[Site Isolation] Web Inspector: Need to report preserved WebFrameProxies as
new frame targets after cross-origin page navigation
https://bugs.webkit.org/show_bug.cgi?id=310043
rdar://172326572
Reviewed by BJ Burg.
During a cross-origin page navigation, rather than destroying and
creating new WebFrameProxies, we actually preserve them as much as the
page's structure permits and merely assign them new web processes.
(Source:
https://github.com/WebKit/WebKit/blob/57438b0e69831fedd7851825b33b09a0917c9b74/Source/WebKit/UIProcess/WebPageProxy.cpp#L5378)
Since we are currently tying a frame target's lifetime purely onto its
WebFrameProxy, when we clean out the target list when committing a
loaded provisional page, we lose the frame targets but never created
new ones, as WebFrameProxies may be reused from the old page and
not created by the new page.
Given that when the provisional page commits, the destination web
processes for the WebFrameProxies have already been updated, we surface
new frame targets with the updated ids. This is necessary over trying
to keep the preserved frame targets because frame ids include the
process id which have changed.
Test:
http/tests/site-isolation/inspector/target/target-cross-origin-page-navigation.html
It should be sufficient to let this test only verify the resulting
frame targets rather than all destroying/creating events in between.
The scenario involves a nested cross-origin iframe and provisional frame
targets can occur, so the stream of events is complex. We let the
target.html sister test to cover the behavior around provisional
frames' lifetime.
There is a console error showing up in the frontend signaling additional
work is required to better support navigation with inspector open.
The error shows up in the test results as noise. Filed Bug 309922 as
a follow-up.
*
LayoutTests/http/tests/site-isolation/inspector/target/target-cross-origin-page-navigation-expected.txt:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/target/target-cross-origin-page-navigation.html:
Added.
* Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp:
(WebKit::WebPageInspectorController::didCommitProvisionalPage):
(WebKit::WebPageInspectorController::didCreateFrame):
Canonical link: https://commits.webkit.org/309357@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications