When updating a subtree of the IsolatedTree, first remove the entire subtree, not...
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 19:22:33 +0000 (19:22 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 19:22:33 +0000 (19:22 +0000)
commit7b551a819cd3fc6d6365dc01102238b364b6529a
tree83c844de816d3b42325da2557d545f6d4ed5ca7f
parentac17a094f58671c206e9e2ba51f8030b30691547
When updating a subtree of the IsolatedTree, first remove the entire subtree, not just the subtree root.
https://bugs.webkit.org/show_bug.cgi?id=207759

Reviewed by Chris Fleizach.

When updating an IsolatedTree subtree, we were removing just the root
of the subtree. Added AXIsolatedTree::removeSubtree that is now used in
updateIsolatedTree.

* accessibility/AXObjectCache.cpp:
(WebCore::createIsolatedTreeHierarchy): If the wrapper is attached
during creation, set it to null in the NodeChange so that it is not
re-attached on the AX thread.
(WebCore::AXObjectCache::updateIsolatedTree): removeSubtree instead of
removeNode.
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::~AXIsolatedObject): When an IsolatedObject
is destroyed, it must have been detached from its wrapper.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::NodeChange::NodeChange): Constructors now
take an IsolatedObject instead of a Ref.
(WebCore::AXIsolatedTree::removeNode):
(WebCore::AXIsolatedTree::removeSubtree):
(WebCore::AXIsolatedTree::applyPendingChanges): Attach wrappers only if
not null. The IsolatedObject refCount must be 2 at that point.
* accessibility/isolatedtree/AXIsolatedTree.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h