Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49a03a1fa5d5841b91c77cb285f1e929b20125c1
      
https://github.com/WebKit/WebKit/commit/49a03a1fa5d5841b91c77cb285f1e929b20125c1
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    A 
LayoutTests/fast/events/site-isolation/event-timing-back-forward-cache-duration-expected.txt
    A 
LayoutTests/fast/events/site-isolation/event-timing-back-forward-cache-duration.html
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/TestController.h

  Log Message:
  -----------
  [Site Isolation] Enable MultiProcessBackForwardCache in WebKitTestRunner when 
Site Isolation is enabled
https://bugs.webkit.org/show_bug.cgi?id=316344
rdar://178760818

Reviewed by Sihui Liu.

Under Site Isolation, WebProcessPool::createWebPage enables 
MultiProcessBackForwardCache
(and UseUIProcessForBackForwardItemLoading) automatically at page creation. 
WebKitTestRunner
applies a full preference set per test in resetPreferencesToConsistentValues
(WKPreferencesResetTestRunnerOverrides resets unspecified preferences to their 
defaults),
which clobbers that runtime flip. As a result BFCache-under-Site-Isolation 
tests ran with
MultiProcessBackForwardCacheEnabled=false, so 
BackForwardCache::addIfCacheable's guard
(siteIsolationEnabled() && !multiProcessBackForwardCacheEnabled()) rejected 
caching and
back/forward restore failed.

Mirror the product coupling in the test runner: when SiteIsolationEnabled is 
resolved true
for a test, also enable MultiProcessBackForwardCacheEnabled. The coupling is 
applied last in
testOptionsForTest so it matches the product's unconditional enable under Site 
Isolation.

UseUIProcessForBackForwardItemLoading is intentionally not coupled yet; 
enabling it surfaces a
separate nested-frame form-state restoration failure (tracked by the FIXME in 
TestController).

Add a same-origin Site-Isolation copy of 
fast/events/event-timing-back-forward-cache-duration
as a regression guard for the coupling. It exercises the same-site, 
no-cross-site-iframe
BFCache path under Site Isolation; the cross-process iframe path is not covered 
here.

* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage): Note the coupling must stay in sync 
with
WebKitTestRunner and add a FIXME to share a single definition.
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::testOptionsForTest): Merge the Site-Isolation-implied 
features.
(WTR::TestController::featuresImpliedBySiteIsolation): Added.
* Tools/WebKitTestRunner/TestController.h:
* 
LayoutTests/fast/events/site-isolation/event-timing-back-forward-cache-duration.html:
 Added.
* 
LayoutTests/fast/events/site-isolation/event-timing-back-forward-cache-duration-expected.txt:
 Added.

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



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

Reply via email to