Documents must keep same AXObjectCache/AXTreeSerializer
A clever trick that was used to batch major document changes into a single operation was to destroy the existing AXObjectCache. For example, this was used for large-scale inertness changes, e.g. caused by a dialog being toggled, or by a fullscreen mode toggle. The unintended consequence of this was that a new AXTreeSerializer was also created, which has logic to assume the first node it sees is the root node. This wreaks havoc when the tree is deserialized, because there is already a root node. The Unserialize() function assumes the new root is correct and destroys the old root's subtree. Follow-up: when we land tree consistency check, we could pass in a boolean value that is true when the serializer is new. Then on the browser side, for new serializers, we can check that there aren't any nodes already present. Bug: 1421550 Change-Id: If36641435884445b692f249a7933c4af8ed94b48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4351150 Reviewed-by:Mason Freed <masonf@chromium.org> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by:
David Tseng <dtseng@chromium.org> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1120044}
Loading
Please register or sign in to comment