Bug 210090

Summary: Initialization of modal nodes should happen lazily, not in the AXObjectCache constructor.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: New BugsAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andres Gonzalez 2020-04-06 19:27:16 PDT
Initialization of modal nodes should happen lazily, not in the AXObjectCache constructor.
Comment 1 Andres Gonzalez 2020-04-06 19:45:26 PDT
Created attachment 395646 [details]
Patch
Comment 2 chris fleizach 2020-04-06 19:57:32 PDT
Comment on attachment 395646 [details]
Patch

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

> Source/WebCore/accessibility/AXObjectCache.cpp:305
> +        m_currentModalNode = currentModalNode();

should currentModalNode() set m_currentModalNode? I feel like that way it can cache the value as needed and return the variable appropriately from one place of access

> Source/WebCore/accessibility/AXObjectCache.cpp:318
> +    m_currentModalNode = currentModalNode();

then here can just return currentModalNode()
Comment 3 Andres Gonzalez 2020-04-06 20:38:23 PDT
Created attachment 395648 [details]
Patch
Comment 4 Andres Gonzalez 2020-04-06 20:41:23 PDT
(In reply to chris fleizach from comment #2)
> Comment on attachment 395646 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=395646&action=review
> 
> > Source/WebCore/accessibility/AXObjectCache.cpp:305
> > +        m_currentModalNode = currentModalNode();
> 
> should currentModalNode() set m_currentModalNode? I feel like that way it
> can cache the value as needed and return the variable appropriately from one
> place of access

Done. 
> 
> > Source/WebCore/accessibility/AXObjectCache.cpp:318
> > +    m_currentModalNode = currentModalNode();
> 
> then here can just return currentModalNode()

Done.
Comment 5 EWS 2020-04-07 04:52:30 PDT
Committed r259633: <https://trac.webkit.org/changeset/259633>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395648 [details].
Comment 6 Radar WebKit Bug Importer 2020-04-07 04:53:18 PDT
<rdar://problem/61388295>