Bug 284125
Summary: | AX: For every clearChildren-addChildren cycle, we create new AccessibilityImageMapLink instances and never clean them up, causing a memory leak | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> |
Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | andresg_22, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 18 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 282117 | ||
Bug Blocks: |
Tyler Wilcock
This happens because AccessibilityImageMapLink subclasses AccessibilityMockObject. This class _should_ subclass AccessibilityNodeObject, which would inherently ensure we only ever create one instance per area element, and clean it up when the area element is destroyed.
The reason this was made to be an AccessibilityMockObject is because area elements do not generate renderers, which was troublesome considering we used to build the accessibility tree by walking the render tree. However, after https://bugs.webkit.org/show_bug.cgi?id=281749, we walk the DOM to build the accessibility tree, so this is now easily solvable.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/141013232>
Tyler Wilcock
Pull request: https://github.com/WebKit/WebKit/pull/43403
EWS
Committed 293278@main (eed31338f551): <https://commits.webkit.org/293278@main>
Reviewed commits have been landed. Closing PR #43403 and removing active labels.