trigger event generation for reparented nodes on attribute changes

AXTree currently only calls |CallNodesChangedCallbacks| for nodes that were not newly created or re-created.

This would exclude calling:
1. legitimately new nodes
2. reparented nodes
3. nodes that were destroyed as a result of |nodes_to_clear|, but that are subsequently re-created. This case is really just an internal "reparent", but no reparenting occurred.

By dropping attribute changes on these types of nodes, we can and do miss attributes like active descendant change. For case 3, if the lca was some ancestor of the changed node in Blink (as the event target), we end up clearing that ancestor subtree and never computing attribute changes.

Note that the correct behavior is to trigger node callbacks on 2 or 3 (not 1).

Bug: 919900
Change-Id: I4679b7c7b3269a5f12ab1a4e8df1a9dfd2563123
Reviewed-on: https://chromium-review.googlesource.com/c/1412485
Commit-Queue: David Tseng <[email protected]>
Reviewed-by: Dominic Mazzoni <[email protected]>
Cr-Commit-Position: refs/heads/master@{#623843}
diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h
index fa3ad15..66be06f 100644
--- a/ui/accessibility/ax_tree.h
+++ b/ui/accessibility/ax_tree.h
@@ -170,7 +170,9 @@
                   bool is_new_root,
                   AXTreeUpdateState* update_state);
 
-  void CallNodeChangeCallbacks(AXNode* node, const AXNodeData& new_data);
+  void CallNodeChangeCallbacks(AXNode* node,
+                               const AXNodeData& old_data,
+                               const AXNodeData& new_data);
 
   void UpdateReverseRelations(AXNode* node, const AXNodeData& new_data);