Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 915f13f72d9a08b9e421aa33d64dbf8dc052c9f8
      
https://github.com/WebKit/WebKit/commit/915f13f72d9a08b9e421aa33d64dbf8dc052c9f8
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-05-13 (Wed, 13 May 2026)

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.cpp
    M Source/WebCore/accessibility/AXCoreObject.h

  Log Message:
  -----------
  AX: Generalize unignoredChildren's pre-order walk into 
traverseDescendantsIncludingIgnored so it can be used elsewhere
https://bugs.webkit.org/show_bug.cgi?id=314745
rdar://176994349

Reviewed by Dominic Mazzoni.

Introduce AXCoreObject::traverseDescendantsIncludingIgnored, a
template helper that walks descendants in pre-order through the core
(includes-ignored) AX tree. The visitor is invoked once per descendant
and returns AXTraversalResult { SkipSubtree, Descend, Stop } to control
descent. The helper keeps a cached parent + siblings cursor across
sibling hops and subtree ascents, so a sibling step costs only
descendant->indexInParent() + a vector index, and an ascent reuses the
cached parent without a re-fetch.

Migrate unignoredChildren and hasUnignoredChild to use the helper.
This new helper is now also available for any future pre-order walk over
the core tree (e.g. an AXID-hashing walk that verifies the main-thread and
secondary-thread isolated-tree shapes match).

* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::unignoredChildren):
(WebCore::AXCoreObject::hasUnignoredChild):
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::traverseDescendantsIncludingIgnored):

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



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

Reply via email to