Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d73ecd9497ab1c4da9378f0d6ea9924af81f5b7c https://github.com/WebKit/WebKit/commit/d73ecd9497ab1c4da9378f0d6ea9924af81f5b7c Author: Tyler Wilcock <tyle...@apple.com> Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths: M LayoutTests/accessibility/mac/html5-input-number-expected.txt M LayoutTests/accessibility/mac/html5-input-number.html M Source/WebCore/accessibility/AXLogger.cpp 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 Log Message: ----------- AX: AXIsolatedTree::updateChildren should not updateNodeAndDependentProperties if children haven't changed https://bugs.webkit.org/show_bug.cgi?id=262711 rdar://problem/116531844 Reviewed by Andres Gonzalez. The intention of the updateNodeAndDependentProperties at the end of updateChildren was to update any properties that depend on AX children (of which there are many). However, we are doing this unconditionally, even when children don't change, which causes lots of wasted work. This patch modifies this behavior to only do this work when children have actually changed. This exposed bugs that were being papered over thanks to this wasteful behavior. On an internal webpage this eliminates 45k node changes, bringing the total from 122k to 77k. * LayoutTests/accessibility/mac/html5-input-number-expected.txt: * LayoutTests/accessibility/mac/html5-input-number.html: * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleLabelCreated): (WebCore::AXObjectCache::onTextSecurityChanged): (WebCore::AXObjectCache::handleAttributeChange): (WebCore::AXObjectCache::performDeferredCacheUpdate): (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::updateNodeAndDependentProperties): (WebCore::AXIsolatedTree::updateChildren): (WebCore::AXIsolatedTree::labelCreated): (WebCore::AXIsolatedTree::removeNode): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: Canonical link: https://commits.webkit.org/269088@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes