Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 96e5bdf065e0cd05046e9e2c5bcb41f99812edfe
      
https://github.com/WebKit/WebKit/commit/96e5bdf065e0cd05046e9e2c5bcb41f99812edfe
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-06-22 (Mon, 22 Jun 2026)

  Changed paths:
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h

  Log Message:
  -----------
  AX: Isolated tree left permanently rootless when the root's ID is applied 
before its node, causing VoiceOver to report "empty web content"
https://bugs.webkit.org/show_bug.cgi?id=317261
rdar://179873618

Reviewed by Dominic Mazzoni and Andres Gonzalez.

setPendingRootNodeIDLocked() and the root object's append are queued under
separate acquisitions of m_changeLogLock (see createEmptyContent() and
nodeChangeForObject()), so a pending-changes snapshot can carry the root ID
before the snapshot that carries the root's append. Since 312765@main, the
apply path consumed rootNodeID from a single snapshot and, if the root object
wasn't in m_readerThreadNodeMap yet, dropped it. m_rootNode then stayed null
forever and VoiceOver reported "empty web content".

To fix this, store only the root ID (m_rootNodeID) and resolve rootNode() on
demand from m_readerThreadNodeMap, mirroring m_focusedNodeID / focusedNode().

In the future, we should apply tree updates entirely atomically. This is
tracked by https://bugs.webkit.org/show_bug.cgi?id=316148.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::treeData):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::clearTreeContentsLocked):
(WebCore::AXIsolatedTree::applyPendingChangesFromSnapshot):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::rootNode):
(WebCore::AXIsolatedTree::unsafeRootNodeID const):

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



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

Reply via email to