Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f9c7e1033362aa474ed608e994dfec49297b3347
      
https://github.com/WebKit/WebKit/commit/f9c7e1033362aa474ed608e994dfec49297b3347
  Author: Zak Ridouh <[email protected]>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/loader/LocalFrameLoaderClient.cpp
    M Source/WebCore/loader/LocalFrameLoaderClient.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h

  Log Message:
  -----------
  REGRESSION (317357@main): 
imported/w3c/web-platform-tests/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history.html
 fails on Site Isolation bots
https://bugs.webkit.org/show_bug.cgi?id=320325
rdar://183266525

Reviewed by Alex Christensen.

317357@main taught isFullyActive to treat a parentless frame that is not the
page's main frame as severed from the frame tree. That signal is correct for a
frame whose owner iframe was removed in another process, but it also matches a
provisional frame mid-cross-process-navigation, which is parentless purely by
construction: createProvisionalSubframe passes AddToFrameTree::No with a
non-null parent, so tree().parent() is null while m_mainFrame points at the
remote main frame.

The mismatch is not transient. Navigation::initializeForNewWindow runs from
didBeginDocument inside DocumentLoader::commitData, before receivedFirstData()
commits the provisional frame into the tree, and it returns early on
hasEntriesAndEventsDisabled() without populating m_entries. An ASSERT that
m_entries is empty prevents it from ever running again, so navigation.entries()
stayed permanently empty for a subframe that had navigated across processes.

Distinguish the two cases explicitly rather than inferring severance from
parentlessness. isFullyActive now asks the LocalFrameLoaderClient whether this
frame is a provisional frame whose load has not committed, in the same shape as
the existing provisionalParentFrame() query. That needs no new state: WebFrame
already tracks the answer in m_provisionalFrame, set by createProvisionalFrame
and cleared by commitProvisionalFrame and destroyProvisionalFrame. Only a
LocalFrame can be provisional, so nothing is added to Frame or RemoteFrame. The
client is consulted only in the no-ancestor case, leaving the severance behavior
317357@main added unchanged.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::isFullyActive const):
* Source/WebCore/loader/LocalFrameLoaderClient.cpp:
(WebCore::LocalFrameLoaderClient::isProvisionalFrame const):
* Source/WebCore/loader/LocalFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::isProvisionalFrame const):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h:

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



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

Reply via email to