-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
023fc91
commit 227e9bc
Showing
5 changed files
with
29 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters