Chromium Code Reviews
DescriptionCorrectly ignore AXTree event creation change state for reparented nodes
When updating an AXTree with a node_id_to_clear, we were adding a node created change for nodes that were removed, then created (a "recreation"). In the source tree though, however, the node was simply reparented (see test).
During deserialization, we first destroyed the node subtree; then, we updated nodes; finally, we sent node created/changed/subtree created based on the update node calls.
In order to detect this case at the unserialized tree phase of the update, introduce a vector to keep track of all nodes removed. A created node is then a new node that is not also a removed node.
Furthermore, a onNodeDataWillChange should not be called for newly created or reparented nodes. This is because during node updates, a node and its *children* are built. The children are not yet populated with data. As a result, we often called onNodeDataWillChange on nodes whose previous data is simply not yet initialized. This caused erroneous tree text change events.
TEST=accessibility_unittest, read Google Docs menus in ChromeVox
BUG=602056
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/54e747470a4de1c2437556581c3a1abd63e6a423
Cr-Commit-Position: refs/heads/master@{#394267}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : Add subtree and node reparented. #
Messages
Total messages: 14 (9 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||