Bug 239787

Summary: AXObjectCache::childrenChanged modifies m_deferred* member variables but doesn't start timer to process them
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Tyler Wilcock 2022-04-26 13:24:37 PDT
AXObjectCache::childrenChanged modifies m_deferred* member variables but doesn't start timer to process them
Comment 1 Radar WebKit Bug Importer 2022-04-26 13:24:51 PDT
<rdar://problem/92354189>
Comment 2 Tyler Wilcock 2022-04-26 13:39:12 PDT
Created attachment 458405 [details]
Patch
Comment 3 chris fleizach 2022-04-26 22:36:28 PDT
Comment on attachment 458405 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458405&action=review

> Source/WebCore/ChangeLog:13
> +        m_deferredNodeAdditionOrRemovalList, since this more accurately

can we make this name shorter. something like
m_deferredNodeChangeList

> Source/WebCore/accessibility/AXObjectCache.cpp:1123
>      if (!renderer)

can we make this method call into childrenChange(Node*) instead of duplicating code?
Comment 4 Tyler Wilcock 2022-04-27 08:26:58 PDT
Created attachment 458447 [details]
Patch
Comment 5 Tyler Wilcock 2022-04-27 08:35:28 PDT
> > Source/WebCore/ChangeLog:13
> > +        m_deferredNodeAdditionOrRemovalList, since this more accurately
> 
> can we make this name shorter. something like
> m_deferredNodeChangeList
To me, "node change list" is a little too vague, as that could encompass any change (e.g. an attribute change). I made it slightly shorter with m_deferredNodeAddedOrRemovedList.

> > Source/WebCore/accessibility/AXObjectCache.cpp:1123
> >      if (!renderer)
> 
> can we make this method call into childrenChange(Node*) instead of
> duplicating code?
We could do that if we can assume every renderer has a node, but I personally don't feel comfortable making that assumption since the opposite assumption has bitten us (every node having a renderer).

I refactored in other ways (including a new deferNodeAddedOrRemoved method that I'll add to in a later modal patch) to reduce duplication.
Comment 6 EWS 2022-04-27 22:37:59 PDT
Committed r293566 (250080@main): <https://commits.webkit.org/250080@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458447 [details].