Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3ad8ffd29cd7df3448ba618f37c5d262a9ed023e
https://github.com/WebKit/WebKit/commit/3ad8ffd29cd7df3448ba618f37c5d262a9ed023e
Author: Basuke Suzuki <[email protected]>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
M LayoutTests/fast/loader/site-isolation/form-state-restore-with-frames.html
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] BFCache restore broken for back-navigation through a data:
URL
https://bugs.webkit.org/show_bug.cgi?id=316534
rdar://179006334
Reviewed by Alex Christensen.
Under Site Isolation, navigating from an http(s) page to a data: URL and then
back
to the source page failed to restore the source from BFCache. Two compounding
gaps
in WebProcessPool were responsible:
- processForNavigationInternal treated data: URLs as same-origin (the SI
carve-out
only covered about: URLs), so a main-frame navigation to data: never
process-swapped and the source page was never suspended into BFCache.
- processForNavigation gated the SI-specific suspended-page lookup on
!site.isEmpty(), which excluded back-navigations whose target URL has an empty
registrable domain (file://, about:blank). Even when a SuspendedPageProxy
existed,
it was not found for those targets.
Extend the carve-out to main-frame navigations to data: URLs (iframes keep the
same-origin treatment so subframes loading data: stay in their parent's
process),
and split the SI block so the suspended-page lookup runs on targetItem alone
while the site-keyed iframe-process reuse logic keeps its existing
!site.isEmpty()
gate.
Together these enable BFCache restore for back-navigation patterns covered by
layout tests in LayoutTests/platform/mac-site-isolation/TestExpectations whose
source page lives at a file:// URL. Four [ Timeout ] entries are removed.
form-state-restore-with-frames.html exercises the same data: → back path. It was
written for the pre-existing same-origin treatment, where the back navigation
reloaded in-process and onload fired again. Under the new BFCache-restore path,
update it to enable UsesBackForwardCache and switch the entry point from onload
to onpageshow, which fires on both the initial load and the BFCache restore.
* LayoutTests/fast/loader/site-isolation/form-state-restore-with-frames.html:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
Canonical link: https://commits.webkit.org/314948@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications