• David Tseng's avatar
    Relax focus requirements in AutomationAXTreeWrapper::IsInFocusChain · 7a166102
    David Tseng authored
    Some web trees, in particular:
    rootWebArea
      iframe
        ***rootWebArea
          iframe
            rootWebArea
    
    *** will set its
    tree->data().focus_id
    but not either its
    focus->GetStringAttribute(            ax::mojom::StringAttribute::kChildTreeId)
    nor its
    tree->data().focused_tree_id
    
    The code assumed this more strict interpretation of the data, which appears to not work in this case. The topmost tree directly points to the innermost frame, skipping the frame in-between.
    
    Fixed: 1038739
    Test: manually on the snippet in the bug.
    Change-Id: I5174cfcfabeb3bb4606d8636ab0f867d1310e52e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080783Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Commit-Queue: David Tseng <dtseng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#746120}
    7a166102
automation_ax_tree_wrapper.cc 26.5 KB