Commit 45d1323b authored by David Tseng's avatar David Tseng Committed by Commit Bot

Prune child trees of invisible aura windows

R=anastasi@google.com, dmazzoni@chromium.org

Test: manually verify the virtual keyboard is pruned from the accessibility tree when hidden and attached when shown
Change-Id: Idb5a28e7458a18b8284d455976be48bf90ec53da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375941Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801576}
parent 5b346d68
......@@ -144,8 +144,12 @@ void AXWindowObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
//
// To avoid this double-parenting, only add the child tree ID of this
// window if the top-level window doesn't have an associated Widget.
//
// Also, if this window is not visible, its child tree should also be
// non-visible so prune it.
if (!window_->GetToplevelWindow() ||
GetWidgetForWindow(window_->GetToplevelWindow())) {
GetWidgetForWindow(window_->GetToplevelWindow()) ||
!window_->IsVisible()) {
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment