• Dominic Mazzoni's avatar
    Remove assumption that the parent AX tree is the desktop. · 748888c0
    Dominic Mazzoni authored
    Currently we have a single root accessibility tree (the "desktop"
    tree) containing all aura Windows and views in the browser process,
    and all WebContents accessibility trees are direct children of that
    tree.
    
    Under multi-process mash, we're going to want it to be possible for a
    remote app to host a WebContents, so we need to remove the assumption
    that the parent accessibility tree of a WebContents must be the root
    accessibility tree.
    
    To do this, modify AutomationInternalCustomBindings::GetParent
    so that it checks for any tree that lists the current tree as
    its child tree, rather than only trying the desktop tree.
    To make this efficient, have AutomationAXTreeWrapper keep track
    of a map from child tree ID to its host.
    
    This is reasonably well-covered by existing tests - if GetParent
    doesn't work correctly, nearly all automation tests break.
    
    Bug: 888147
    Change-Id: Ib7350d51dffed345dd03ec11e6cc0b7591bb243c
    Reviewed-on: https://chromium-review.googlesource.com/c/1286903
    Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
    Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#604729}
    748888c0
automation_ax_tree_wrapper.cc 18.9 KB