Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1108a6fbaaba02b30e403d7c5425f961af59619
      
https://github.com/WebKit/WebKit/commit/d1108a6fbaaba02b30e403d7c5425f961af59619
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-04-03 (Fri, 03 Apr 2026)

  Changed paths:
    M Source/WebCore/history/BackForwardCache.cpp

  Log Message:
  -----------
  [BFCache] Fix WebCore cacheability checks for RemoteFrame children
https://bugs.webkit.org/show_bug.cgi?id=311209
rdar://173799983

Reviewed by Sihui Liu.

Fix BFCache cacheability checks for pages with RemoteFrame children
under Site Isolation:

- canCacheLocalFrame(): Extract LocalFrame-specific checks from the
  old canCacheFrame(LocalFrame&).
- canCacheFrame(): New dispatcher that handles both LocalFrame and
  RemoteFrame, recursing through all children via canCacheChildFrames().
- canCachePage(): Use Page::mainFrame() instead of localMainFrame() to
  check all frames, remove siteIsolationEnabled() check from settings
  (now gated by shouldUseBackForwardCache), early return for iframe
  processes where loadType/Clear-Site-Data checks are N/A.
- addIfCacheable(): Skip in-process (same-origin) caching when Site
  Isolation is enabled. The UIProcess has no mechanism to detach
  RemotePageProxy objects from the BrowsingContextGroup during
  in-process navigations. Cross-process suspension already handles
  this via BrowsingContextGroup exchange in suspendCurrentPageIfPossible.

Covered by existing tests.

* Source/WebCore/history/BackForwardCache.cpp:
(WebCore::canCacheLocalFrame):
(WebCore::canCacheChildFrames):
(WebCore::canCacheFrame):
(WebCore::canCachePage):
(WebCore::BackForwardCache::addIfCacheable):

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



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

Reply via email to