Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8446de095a38ca4cc21871a3bc361dfe95c10846
      
https://github.com/WebKit/WebKit/commit/8446de095a38ca4cc21871a3bc361dfe95c10846
  Author: Per Arne Vollan <[email protected]>
  Date:   2026-09-05 (Sat, 05 Sep 2026)

  Changed paths:
    M 
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in
    A Source/WebKit/Shared/ShouldFreezeLayerTree.h
    M Source/WebKit/UIProcess/SuspendedPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Cross-origin iframe is not always rendering after navigating 
back
https://bugs.webkit.org/show_bug.cgi?id=323352
rdar://178140877

Reviewed by Sihui Liu.

With Site Isolation enabled, cross-origin iframes are not always rendering 
after navigating back.
This is flaky, and the cause of the issue is that the layer tree is not frozen 
between the call
to WebPage::restoreWithFrameItem and until a new drawing area is set after the 
call to
WebPageProxy::swapToProvisionalPage.
Without freezing the layer tree, RemoteLayerTreeDrawingArea::updateRendering 
can potentially be
called before a new drawing area is available in the WebContent process, and 
use the drawing area
that will be replaced after WebPageProxy::swapToProvisionalPage is called in 
the UI process.
The flaky nature of this bug is due to the fact that 
RemoteLayerTreeDrawingArea::updateRendering
is called on a timer in the WebContent process.

We freeze the layer tree in order to defer the compositing update — and with it 
the root
compositing layer attachment — until after the new drawing area is in place. We 
can't simply
force a rendering update after the drawing area swap: the reason is that 
RenderLayerCompositor
only attaches the root layer once (m_rootLayerAttachment), so once it lands on 
the outgoing
drawing area the new one never gets it.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* 
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in:
* Source/WebKit/Shared/ShouldFreezeLayerTree.h: Added.
* Source/WebKit/UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::unsuspend):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goToBackForwardItem):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreWithFrameItem):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, 
MultiProcessBFCacheIframeRendersAfterBackNavigation)):

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



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

Reply via email to