Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e16931a76e073054bf88567542c6d06469d3097e
https://github.com/WebKit/WebKit/commit/e16931a76e073054bf88567542c6d06469d3097e
Author: Basuke Suzuki <[email protected]>
Date: 2026-05-22 (Fri, 22 May 2026)
Changed paths:
M Source/WebCore/history/BackForwardCache.cpp
M Source/WebCore/page/FrameTree.cpp
M Source/WebCore/page/FrameTree.h
M Source/WebKit/UIProcess/WebBackForwardCache.cpp
M Source/WebKit/UIProcess/WebBackForwardCacheEntry.cpp
M Source/WebKit/UIProcess/WebBackForwardCacheEntry.h
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.h
Log Message:
-----------
[Site Isolation] Add WebFrameProxy children manipulation and
WebBackForwardCacheEntry caching foundations
https://bugs.webkit.org/show_bug.cgi?id=315105
rdar://177439863
Reviewed by Sihui Liu.
Foundation APIs for the UI-driven multi-process BFCache. No call sites yet —
those land in the follow-up that wires the suspend / restore orchestration.
WebFrameProxy gains takeChildFrames/adoptChildFrames so the orchestrator
can detach a subframe subtree from m_childFrames on suspension and reattach
it on restore. takeChildFrames clears each detached frame's m_parentFrame;
adoptChildFrames re-parents each frame to the receiver. Walkers of the
live frame tree never observe cached-page state while a subtree is held by
a WebBackForwardCacheEntry.
WebBackForwardCacheEntry gains a slot for the detached subtree
(m_cachedChildren) with setCachedChildren / takeCachedChildren plumbing
and a hasCachedChildren predicate. referencesIframeProcess answers whether
the cached subtree references a given iframe ProcessIdentifier. The
corresponding iframe-process RemotePageProxies stay in the
BrowsingContextGroup throughout suspension so the cached and any new
active iframe document share the same WebPage in the iframe process —
mirroring how the main frame's WebPage is reused across same-site BFCache.
WebBackForwardCache::removeEntriesForProcess additionally checks
referencesIframeProcess so an iframe process termination drops every entry
that holds cached state for it. No-op until the orchestrator populates
m_cachedChildren.
FrameTree gains hasRemoteFrameDescendant() — re-home of the static helper
previously defined in BackForwardCache.cpp. BackForwardCache::addIfCacheable
uses the new method.
No new tests (foundation only — covered when the orchestration lands).
* Source/WebCore/history/BackForwardCache.cpp:
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::hasRemoteFrameDescendant): Deleted.
* Source/WebCore/page/FrameTree.h:
* Source/WebCore/page/FrameTree.cpp:
(WebCore::FrameTree::hasRemoteFrameDescendant const):
* Source/WebKit/UIProcess/WebBackForwardCache.cpp:
(WebKit::WebBackForwardCache::removeEntriesForProcess):
* Source/WebKit/UIProcess/WebBackForwardCacheEntry.h:
* Source/WebKit/UIProcess/WebBackForwardCacheEntry.cpp:
(WebKit::WebBackForwardCacheEntry::setCachedChildren):
(WebKit::WebBackForwardCacheEntry::takeCachedChildren):
(WebKit::WebBackForwardCacheEntry::referencesIframeProcess const):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::takeChildFrames):
(WebKit::WebFrameProxy::adoptChildFrames):
Canonical link: https://commits.webkit.org/313713@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications