• Nektarios Paisios's avatar
    Adds ability in AXPosition to stop at the boundary of a window-like node · 0448e5ac
    Nektarios Paisios authored
    One of the consequences of exposing Views as an AXTree is that
    certain assumptions in AXPosition are no longer true.
    One of those assumptions is that if a null position has been returned from a method
    that moves from a non-null position to some other position, such as `CreatePositionAtEndOfAnchor`,
    then the beginning or the end of the whole content has been reached.
    This is no longer true when a tree of Views is connected to the main tree
    representing the currently visible webpage.
    It's also not true when AXPosition starts to be used more on Chrome OS, where the whole desktop
    is exposed using a forest of AXTrees.
    
    In this patch, the entirety of the AXPosition code was scanned for any assumptions that would
    prevent it from working when the webpage's main tree is connected to a Views tree.
    Also, care was taken to ensure that UI Automation text range provider methods work as before,
    for e example navigating by word, line, etc. shouldnot stop at iframe boundaries.
    
    AX-Relnotes: n/a.
    
    Split out from patch that fixes CreatePositionAtStart/EndOfContent
    https://chromium-review.googlesource.com/c/chromium/src/+/2595454/
    
    Bug: 1049261
    R=dmazzoni@chromium.org, aleventhal@chromium.org
    
    Change-Id: I1a25d9f715c50773b418d322c2f7c52eacbd6732
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2597568
    Commit-Queue: Nektarios Paisios <nektar@chromium.org>
    Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#839989}
    0448e5ac
automation_internal_custom_bindings.cc 107 KB