Fix bug in AXTreeSerializer::Reset
In a few places in the code we call AXTreeSerializer::Reset when there's a tricky reparenting issue or when we really want the accessibility tree to be re-serialized from scratch (like when the mode changes). However, this can lead to a corner case where the next update from the serializer can't be unserialized, because the client tries to unserialize it as an incremental update, but it contains some reparenting. The trick is to just ensure that we always set node_id_to_clear on the next update after a reset. That also requires us to relax the previous requirement that node_id_to_clear must be valid. Now the serializer sets node_id_to_clear to be equal to the root after a reset, to guarantee that the client ends up with a fresh start. Bug: 878325 Change-Id: Iff255a3f62e47363be0b3d9c2f6809c229a6a00f Reviewed-on: https://chromium-review.googlesource.com/1198009Reviewed-by:David Tseng <dtseng@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#589017}
Showing
Please register or sign in to comment