RESOLVED FIXED Bug 233767
AX: In AccessibilityRenderObject::documentLinks, use existing image-map document links instead of always creating new ones
https://bugs.webkit.org/show_bug.cgi?id=233767
Summary AX: In AccessibilityRenderObject::documentLinks, use existing image-map docum...
Tyler Wilcock
Reported 2021-12-02 10:03:18 PST
The current implementation of AccessibilityRenderObject::documentLinks always creates new image-map links rather than using the existing ones created via AccessibilityRenderObject::addImageMapChildren. This is problematic for two reasons: 1. It is wasteful in terms of memory usage as we will endlessly accumulate AccessibilityImageMapLink objects in the cache each time AccessibilityRenderObject::documentLinks is called. 2. It breaks document links in isolated tree mode, since the objects created this way aren't a child of any other object, and thus don't have any representation in the isolated tree. Concretely, this means AXIsolatedTree::nodeForID never returns anything for these objects.
Attachments
Patch (12.66 KB, patch)
2021-12-02 10:11 PST, Tyler Wilcock
no flags
Patch (12.65 KB, patch)
2021-12-02 11:27 PST, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2021-12-02 10:03:45 PST
Tyler Wilcock
Comment 2 2021-12-02 10:11:36 PST
chris fleizach
Comment 3 2021-12-02 11:22:08 PST
Comment on attachment 445733 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445733&action=review > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2064 > + HTMLMapElement& map = downcast<HTMLMapElement>(*parent); this could be auto& map
Tyler Wilcock
Comment 4 2021-12-02 11:27:50 PST
EWS
Comment 5 2021-12-02 20:17:37 PST
Committed r286477 (244816@main): <https://commits.webkit.org/244816@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445754 [details].
Note You need to log in before you can comment on or make changes to this bug.