[Webkit-unassigned] [Bug 232130] AX: AccessibilityObject::m_haveChildren and AXCoreObject::hasChildren() are misleadingly named
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 25 07:21:18 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=232130
--- Comment #13 from Tyler Wilcock <tyler_w at apple.com> ---
(In reply to Andres Gonzalez from comment #12)
> (In reply to Tyler Wilcock from comment #10)
> > Created attachment 442314 [details]
> > Patch
>
> --- a/Source/WebCore/accessibility/AccessibilitySpinButton.cpp
> +++ a/Source/WebCore/accessibility/AccessibilitySpinButton.cpp
> @@ -45,9 +45,9 @@ AccessibilitySpinButton::~AccessibilitySpinButton() =
> default;
>
> AXCoreObject* AccessibilitySpinButton::incrementButton()
> {
> - if (!m_haveChildren)
> + if (!m_childrenInitialized)
> addChildren();
> - if (!m_haveChildren)
> + if (!m_childrenInitialized)
> return nullptr;
>
> Does this second check for m_childrenInitialized even make sense? Since
> addChildren should set it to true by definition.
>
> Same for AccessibilitySpinButton::decrementButton.
Seems like this guards against the case where a caller used `incrementButton` without a cache active.
void AccessibilitySpinButton::addChildren()
{
AXObjectCache* cache = axObjectCache();
if (!cache)
return;
m_childrenInitialized = true;
...
}
This extra check was introduced by this bug: https://bugs.webkit.org/show_bug.cgi?id=157830
--
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/20211025/b9405b6a/attachment.htm>
More information about the webkit-unassigned
mailing list