Commit 1e36ed7e authored by Randy Rossi's avatar Randy Rossi Committed by Commit Bot

Don't clobber focus in chromecast overridden GetTreeData method

Focus should only be set if the child tree is found.
Otherwise, leave the focus set by the super method alone.
This was causing the reader to lose focus on cast and
webviews embedded in the display assistant's main tree.

Bug: NONE
Test: display assistant with youtube/weather app/page
Change-Id: If82855ada00fa679806987e8f78332799d0e7015
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339497Reviewed-by: default avatarAlex Sakhartchouk <alexst@chromium.org>
Commit-Queue: Randy Rossi <rmrossi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795447}
parent 1950fa3a
...@@ -40,7 +40,6 @@ bool AXTreeSourceAura::GetTreeData(ui::AXTreeData* tree_data) const { ...@@ -40,7 +40,6 @@ bool AXTreeSourceAura::GetTreeData(ui::AXTreeData* tree_data) const {
aura::client::GetFocusClient(root_window); aura::client::GetFocusClient(root_window);
if (focus_client) { if (focus_client) {
aura::Window* window = focus_client->GetFocusedWindow(); aura::Window* window = focus_client->GetFocusedWindow();
tree_data->focus_id = ui::AXNode::kInvalidAXID;
// Search for the full screen shell surface that holds the child // Search for the full screen shell surface that holds the child
// tree for our UI. This is the node that should receive focus. // tree for our UI. This is the node that should receive focus.
......
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