ClearChildren should only detach children who point to that parent.
We want to to allow relations such as labelled-by and described-by to reference elements that are inert. There seems to be precedent for a node having a child with a parent other than itself (see ax_node_object.cc:2447). With this in mind, when a node node is being cleared, it should only clear its child's parent pointer if it points to itself(the parent currently clearing its children). Example: node a: children = { b, c }, parent = null node b: children = { c }, parent = a node c: children = { g, h, i }, parent = a In this case, node c is both a child of the a (the root) and b. If we clear node b, we should not disconnect node c, from a. The tree would look like this: a |____ | | b c |________ | | | g h i Where node b would have indirect_children = {c} Patchset 1 reverts the mitigation that was checked in here: commit 5ef90f37 https://chromium-review.googlesource.com/c/chromium/src/+/1814460 Bug: 996992 Change-Id: I9b9cbc10aea473270178f15f283a1bacfa71b971 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838473 Commit-Queue: Jacques Newman <janewman@microsoft.com> Reviewed-by:Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#706627}
Showing
Please register or sign in to comment