• Aaron Leventhal's avatar
    Detached nodes must be ignored, not included in tree · 573dad08
    Aaron Leventhal authored
    This fix ensures that detached objects are never considered as
    included in the tree.
    
    Explanation:
    Sometimes a node is detached in the middle of the tree. For example,
    this can occur when a combobox popup closes its popup. Currently, when
    a node is detached in the middle of the tree, the parent hierarchy may
    not be immediately repaired, to skip over the old detached object,
    which can cause anything using ParentObjectIncludedInTree() to reach
    a detached object, which is not actually included in the tree.
    Normally the parent hierarchy will be repaired the next time the
    detached object's parent's children are requested.
    
    An alternate fix would be to, immediately when a node is detached,
    ensure that the parent hierarchy is always repaired when nodes are
    detached in the middle of the hierarchy. However, care would need to
    be taken to avoid extra work when an entire document or subtree is
    being removed.
    
    Bug: 1167459
    Change-Id: If374617f451992c1f68607dc9b3c56bc0f0908c4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2638395Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
    Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#845135}
    573dad08
ax_object.cc 178 KB