Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 227e9bce988182fcbc160b49a01ccdd7b4edbd35 https://github.com/WebKit/WebKit/commit/227e9bce988182fcbc160b49a01ccdd7b4edbd35 Author: Andres Gonzalez <andresg...@apple.com> Date: 2023-11-17 (Fri, 17 Nov 2023)
Changed paths: M Source/WebCore/accessibility/AXCoreObject.h 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: Duplicated relationships in AXObjectCache::m_relations. https://bugs.webkit.org/show_bug.cgi?id=265044 <rdar://problem/118566254> Reviewed by Tyler Wilcock. Under certain conditions it is possible to add more than one entry to the AXObjectCache::m_relations data structure for the same pair of objects and the same relation type. To avoid this, this patch replaces the Vector in AXRelation with a ListHashSet. This also has some performance gain, since find and remove opeartions are o(1) in ListHashSets. In addition, changed the enum AddingSymmetricRelation to AddSymmetricRelation which makes the code more readable. * Source/WebCore/accessibility/AXCoreObject.h: * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::addRelation): (WebCore::AXObjectCache::removeRelationByID): (WebCore::AXObjectCache::relatedObjectIDsFor): (WebCore::AXObjectCache::objectsForIDs const): Deleted. * Source/WebCore/accessibility/AXObjectCache.h: (WebCore::AXObjectCache::objectsForIDs const): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::objectsForIDs): (WebCore::AXIsolatedTree::relatedObjectIDsFor): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: Canonical link: https://commits.webkit.org/270916@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes