Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5829)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js

Issue 2573203002: Make the matching of root dialogs more strict (Closed)
Patch Set: Make the matching of root dialogs more strict Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
index 3fe675afc04c67156a33e36b044354bfad0493d0..bb028e04d715eff8dfdb175bb2e9257de75eb76c 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -322,9 +322,17 @@ AutomationPredicate.structuralContainer = AutomationPredicate.roles([
*/
AutomationPredicate.root = function(node) {
switch (node.role) {
- case Role.dialog:
case Role.window:
return true;
+ case Role.dialog:
+ // The below logic handles nested dialogs properly in the desktop tree
+ // like that found in a bubble view.
+ return node.root.role != Role.desktop ||
+ (!!node.parent &&
+ node.parent.role == Role.window &&
+ node.parent.children.every(function(child) {
+ return node.role == Role.window || node.role == Role.dialog;
+ }));
case Role.toolbar:
return node.root.role == Role.desktop;
case Role.rootWebArea:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698