[Webkit-unassigned] [Bug 231914] AX: Any addition of children should funnel through AccessibilityObject::addChild

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 19 08:07:53 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231914

--- Comment #6 from Andres Gonzalez <andresg_22 at apple.com> ---
(In reply to Tyler Wilcock from comment #3)
> Created attachment 441675 [details]
> Patch

--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

-    if (HTMLElement* autoFillElement = input.autoFillButtonElement()) {
-        if (AccessibilityObject* axAutoFill = axObjectCache()->getOrCreate(autoFillElement))
-            m_children.append(axAutoFill);
-    }
+    if (HTMLElement* autoFillElement = input.autoFillButtonElement())

if (auto* autoFillElement = input.autoFillButtonElement())

+        addChild(axObjectCache()->getOrCreate(autoFillElement));

We were checking for nullity of axObjectCache() before. I wouldn't remove that check yet, until we solidify the life times of the objects respect to the cache.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211019/f0865497/attachment.htm>


More information about the webkit-unassigned mailing list