Commit 9af7fd20 authored by Katie D's avatar Katie D Committed by Commit Bot

Only use ARC++ work-around when the focused node root is not desktop.

This fixes a bug where STS could read information behind the lock screen.

Bug: 831418
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I25e79e777042dc3c0b2e40a8cbf5fdb6f6ee42cb
Reviewed-on: https://chromium-review.googlesource.com/1010823
Commit-Queue: Katie Dektar <katie@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550805}
parent 92ac2271
...@@ -298,8 +298,13 @@ SelectToSpeak.prototype = { ...@@ -298,8 +298,13 @@ SelectToSpeak.prototype = {
// which is computed based on which window is the event handler for the // which is computed based on which window is the event handler for the
// hit point, isn't the part of the tree that contains the actual // hit point, isn't the part of the tree that contains the actual
// content. In such cases, use focus to get the root. // content. In such cases, use focus to get the root.
if (!findAllMatching(root, rect, nodes) && focusedNode) // TODO(katie): Determine if this work-around needs to be ARC++ only. If
// so, look for classname exoshell on the root or root parent to confirm
// that a node is in ARC++.
if (!findAllMatching(root, rect, nodes) && focusedNode &&
focusedNode.root.role != RoleType.DESKTOP) {
findAllMatching(focusedNode.root, rect, nodes); findAllMatching(focusedNode.root, rect, nodes);
}
this.startSpeechQueue_(nodes); this.startSpeechQueue_(nodes);
this.recordStartEvent_(START_SPEECH_METHOD_MOUSE); this.recordStartEvent_(START_SPEECH_METHOD_MOUSE);
}.bind(this)); }.bind(this));
......
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