Commit f3e4b94f authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

Avoid cycle in Accessibility tree

This is a temporary fix. By ignoring the node when it is invisible, we
avoid navigating the cycle repeatedly. However the underlying issue
is not addressed, and requires further investigation.

Bug: 1020733
Change-Id: I70334259b4f271256f21dab47271f7a8346f1f7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919434
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717755}
parent 2e2c9207
...@@ -105,8 +105,12 @@ void AXWindowObjWrapper::Serialize(ui::AXNodeData* out_node_data) { ...@@ -105,8 +105,12 @@ void AXWindowObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
out_node_data->role = ax::mojom::Role::kWindow; out_node_data->role = ax::mojom::Role::kWindow;
out_node_data->AddStringAttribute(ax::mojom::StringAttribute::kName, out_node_data->AddStringAttribute(ax::mojom::StringAttribute::kName,
base::UTF16ToUTF8(window_->GetTitle())); base::UTF16ToUTF8(window_->GetTitle()));
if (!window_->IsVisible()) if (!window_->IsVisible()) {
out_node_data->AddState(ax::mojom::State::kInvisible); out_node_data->AddState(ax::mojom::State::kInvisible);
// TODO(crbug/1020733): Find and address the root cause of the cycle, then
// remove the line below.
out_node_data->AddState(ax::mojom::State::kIgnored);
}
out_node_data->relative_bounds.bounds = out_node_data->relative_bounds.bounds =
gfx::RectF(window_->GetBoundsInScreen()); gfx::RectF(window_->GetBoundsInScreen());
......
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