Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 523acc3. rdar://problem/100245048
AX: AXIsolatedTree::updateChildren doesn't propagate updates downwards when AccessibilityObject::m_subtreeDirty is true https://bugs.webkit.org/show_bug.cgi?id=245694 rdar://100245048 Reviewed by Chris Fleizach. When AXIsolatedTree::updateChildren updates the children of the nearest in-isolated-tree ancestor to the parameter object, it compares the new children of that object to the "old" ones, i.e. the children for that object in the nodemap. If we found that the object's new children included an object that already existed in the old nodemap children, we do nothing (besides deliberately not queuing it for deletion). Based on the update pattern of some sites, doing nothing in this scenario is not right, since this existing object could have m_subtreeDirty set, meaning we need to propagate descendant updates downwards. This is exactly what the live tree does in AccessibilityObject::insertChild. With this patch, we detect m_subtreeDirty in this scenario and propagate that update downwards with AXIsolatedTree::collectNodeChangesForSubtree. Fixes accessibility/text-alternative-calculation-from-listbox.html which is dependent on m_subtreeDirty updates being handled properly. * LayoutTests/accessibility-isolated-tree/TestExpectations: * Source/WebCore/accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::hasDirtySubtree const): Added. * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::updateChildren): Canonical link: https://commits.webkit.org/254899@main Canonical link: https://commits.webkit.org/252432.473@safari-7614.2.9.1-branch
- Loading branch information