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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js

Issue 1067113002: Reland: Add an event to notify accessibility when a permissions bubble gets shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise/relocate comment Created 5 years, 8 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview ChromeVox utilities for the automation extension API. 6 * @fileoverview ChromeVox utilities for the automation extension API.
7 */ 7 */
8 8
9 goog.provide('AutomationUtil'); 9 goog.provide('AutomationUtil');
10 goog.provide('AutomationUtil.Dir'); 10 goog.provide('AutomationUtil.Dir');
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 * to a candidate node. 106 * to a candidate node.
107 * @return {AutomationNode} 107 * @return {AutomationNode}
108 */ 108 */
109 AutomationUtil.findNextNode = function(cur, dir, pred) { 109 AutomationUtil.findNextNode = function(cur, dir, pred) {
110 var next = cur; 110 var next = cur;
111 do { 111 do {
112 if (!(next = AutomationUtil.findNextSubtree(cur, dir))) 112 if (!(next = AutomationUtil.findNextSubtree(cur, dir)))
113 return null; 113 return null;
114 cur = next; 114 cur = next;
115 next = AutomationUtil.findNodePre(next, dir, pred); 115 next = AutomationUtil.findNodePre(next, dir, pred);
116 if (next && AutomationPredicate.shouldIgnoreLeaf(next))
117 next = null;
116 } while (!next); 118 } while (!next);
117 return next; 119 return next;
118 }; 120 };
119 121
120 /** 122 /**
121 * Given nodes a_1, ..., a_n starting at |cur| in pre order traversal, apply 123 * Given nodes a_1, ..., a_n starting at |cur| in pre order traversal, apply
122 * |pred| to a_i and a_(i - 1) until |pred| is satisfied. Returns a_(i - 1) or 124 * |pred| to a_i and a_(i - 1) until |pred| is satisfied. Returns a_(i - 1) or
123 * a_i (depending on opt_options.before) or null if no match was found. 125 * a_i (depending on opt_options.before) or null if no match was found.
124 * @param {AutomationNode} cur 126 * @param {AutomationNode} cur
125 * @param {Dir} dir 127 * @param {Dir} dir
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 * @return {boolean} 243 * @return {boolean}
242 */ 244 */
243 AutomationUtil.isInSameTree = function(a, b) { 245 AutomationUtil.isInSameTree = function(a, b) {
244 if (!a || !b) 246 if (!a || !b)
245 return true; 247 return true;
246 248
247 return a.root === b.root; 249 return a.root === b.root;
248 }; 250 };
249 251
250 }); // goog.scope 252 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698