Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c0673b1cf7b66732ed2b9633586e35bd31f53003
      
https://github.com/WebKit/WebKit/commit/c0673b1cf7b66732ed2b9633586e35bd31f53003
  Author: Tyler Wilcock <tyle...@apple.com>
  Date:   2025-03-07 (Fri, 07 Mar 2025)

  Changed paths:
    M 
LayoutTests/accessibility/accessibility-node-memory-management-expected.txt
    M LayoutTests/accessibility/accessibility-node-memory-management.html
    M 
LayoutTests/platform/glib/accessibility/accessibility-node-memory-management-expected.txt
    M LayoutTests/platform/mac-wk2/TestExpectations
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm

  Log Message:
  -----------
  REGRESSION(291652@main): accessibility-node-memory-management.html is timing 
out
https://bugs.webkit.org/show_bug.cgi?id=289371
rdar://146514331

Reviewed by Chris Fleizach.

291652@main caused this test to regress only because it changed the timing on 
when the accessibility tree is built
after a focus change, exposing an existing bug where depending on the 
interleaving and timing of the recomputation of
is-ignored and handling children-changed, we can compute the wrong 
accessibility tree.

We could fix this, but really don't need to with the enablement of 
ENABLE(INCLUDE_IGNORED_IN_CORE_AX_TREE), which
makes us immune to these minor timing differences.

This commit rewrites accessibility-node-memory-management.html to a more modern 
style that is properly async considering
the dynamic page changes from JS it performs.

In the process of trying to understand how 291652@main caused this issue, I 
ended up polishing the change up a bit more.
With this commit:

  - We now only initializeSortedIDLists and maintain these eagerly sorted lists 
when an AT actually needs them. This
    avoids incurring a cost for ATs that will never need these, like Hover Text.

  - We now properly initalize the isolated tree the sorted lists upon creation, 
rather than creating a tree and waiting
    for them to be synced over, causing a short period where clients can make 
requests to the tree but the state is
    missing.

  - onDocumentRenderTreeCreation now starts the cache-update timer if it's not 
active. This is pretty important
    considering this list is processed as part of performDeferredCacheUpdate.

* LayoutTests/accessibility/accessibility-node-memory-management-expected.txt:
* LayoutTests/accessibility/accessibility-node-memory-management.html:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::create):
(WebCore::AXIsolatedTree::setInitialSortedLiveRegions):
(WebCore::AXIsolatedTree::setInitialSortedNonRootWebAreas):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::onDocumentRenderTreeCreation):
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate):
(WebCore::AXObjectCache::sortedLiveRegions):
(WebCore::AXObjectCache::sortedNonRootWebAreas):
(WebCore::AXObjectCache::addSortedObject):
(WebCore::AXObjectCache::removeLiveRegion):
(WebCore::AXObjectCache::initializeSortedIDLists):
(WebCore::AXObjectCache::sortedLiveRegions const): Deleted.
(WebCore::AXObjectCache::sortedNonRootWebAreas const): Deleted.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to