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.
<rdar://problem/85976724>
Created attachment 445733 [details] Patch
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
Created attachment 445754 [details] Patch
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].