Support event notifications in IsolatedTree mode.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Feb 2020 17:31:03 +0000 (17:31 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Feb 2020 17:31:03 +0000 (17:31 +0000)
commit21c8effd765003737b4537b72cf3ee035f725784
tree405621fe3e8d81b706cf642f9691f402ef022fcb
parent26ea7a24ff0fa67c74cf095276bce91b3a5b5a99
Support event notifications in IsolatedTree mode.
https://bugs.webkit.org/show_bug.cgi?id=207581

Reviewed by Chris Fleizach.

- DOM/Render trees notifications are listened to by AXObjectCache and
the corresponding IsolatedTree is updated.
- The update is now happening for state, value and children change
notifications.
- AXObjectCache::updateIsolatedTree re-generates the subtree rooted at
the node receiving the notification.
- Consolidated creation of AXIsolatedObjects by passing treeID and
parentID to the create method and constructor.
- Changes to the IsolatedTree are set on the main thread using the
NodeChange structure, and applied to the tree on the AX thread.
- The updated IsolatedObjects are attached to their corresponding
platform wrappers on the AX thread, so that after creation they are only
accessed on the secondary thread.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postNotification): Invokes updateIsolatedTree.
(WebCore::createIsolatedTreeHierarchy):
(WebCore::AXObjectCache::generateIsolatedTree):
(WebCore::AXObjectCache::updateIsolatedTree):
(WebCore::AXObjectCache::createIsolatedTreeHierarchy): Became a static helper function.
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::create):
(WebCore::AXIsolatedObject::setProperty):
(WebCore::AXIsolatedObject::setParent):
(WebCore::AXIsolatedObject::detachFromParent):
(WebCore::AXIsolatedObject::setTreeIdentifier): Deleted, the tree identifier is set in the constructor.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::NodeChange::NodeChange):
(WebCore::AXIsolatedTree::appendNodeChanges):
(WebCore::AXIsolatedTree::applyPendingChanges):
* accessibility/isolatedtree/AXIsolatedTree.h:
* accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::attachPlatformWrapper):
* accessibility/mac/AXObjectCacheMac.mm:

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