<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog"
href="https://bugs.webkit.org/show_bug.cgi?id=138566#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog"
href="https://bugs.webkit.org/show_bug.cgi?id=138566">bug 138566</a>
from <span class="vcard"><a class="email" href="mailto:cfleizach@apple.com" title="chris fleizach <cfleizach@apple.com>"> <span class="fn">chris fleizach</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=264467&action=diff" name="attach_264467" title="patch">attachment 264467</a> <a href="attachment.cgi?id=264467&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=264467&action=review">https://bugs.webkit.org/attachment.cgi?id=264467&action=review</a>
thanks!
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:145
> + , m_currentAriaModalNode(nullptr)</span >
we should remove the pointer to m_currentAriaModalNode in our method that detects when nodes disappear.
you can imagine if someone removed a tree that contains m_currentAriaModalNode, we could have a stale pointer
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:164
> + m_currentAriaModalNode = nullptr;</span >
this is set again to null in updateCurrentAriaModalNode() so it seems unnecessary here
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:217
> + if (!node || !is<Element>(node))</span >
!is<Element>(node) should take care of !node so i think we can drop that
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:1349
> + if (!node || !is<Element>(node))</span >
ditto about !node
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:1355
> + stopCachingComputedObjectAttributes();</span >
do you need to start caching again at the end of this method?
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:1360
> + m_ariaModalNodesSet.add(node);</span >
since m_ariaModalNodesSet is already a set i don't think you need to check contains() first
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.cpp:1364
> + if (m_ariaModalNodesSet.contains(node))</span >
ditto about contains()
<span class="quote">> Source/WebCore/accessibility/AXObjectCache.h:306
> + ListHashSet<RefPtr<Node>> m_ariaModalNodesSet;</span >
do we want to RefPtr the nodes here? i don't think we retain other Nodes. We just have to be careful about cleaning up these things
you can imagine if the Document node got into this list we'd have a retain cycle
<span class="quote">> Source/WebCore/accessibility/AccessibilityObject.cpp:1867
> +bool AccessibilityObject::ignoredFromARIAModalPresence() const</span >
can you add a comment what this method does
<span class="quote">> Source/WebCore/accessibility/AccessibilityObject.cpp:1870
> + if (!node() || !node()->parentNode())</span >
is this necessary? it seems like the below checks will take care of these cases</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>