Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
index 374052e171147c9c433d201dfd90ee68c7fea818..fbe739f2d0dd189765b6dba0935cf02edb7ad677 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
@@ -18,7 +18,7 @@ cvox2.AutomationPredicates = function() {}; |
/** |
* Constructs a predicate given a role. |
* @param {string} role |
- * @return {function(AutomationNode) : boolean} |
+ * @return {function(chrome.automation.AutomationNode) : boolean} |
*/ |
cvox2.AutomationPredicates.makeRolePredicate = function(role) { |
return function(node) { |
@@ -26,18 +26,15 @@ cvox2.AutomationPredicates.makeRolePredicate = function(role) { |
}; |
}; |
-/** @type {function(AutomationNode) : boolean} */ |
+/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
cvox2.AutomationPredicates.heading = |
- cvox2.AutomationPredicates.makeRolePredicate( |
- chrome.automation.RoleType.heading); |
-/** @type {function(AutomationNode) : boolean} */ |
+ cvox2.AutomationPredicates.makeRolePredicate('heading'); |
+/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
cvox2.AutomationPredicates.inlineTextBox = |
- cvox2.AutomationPredicates.makeRolePredicate( |
- chrome.automation.RoleType.inlineTextBox); |
-/** @type {function(AutomationNode) : boolean} */ |
+ cvox2.AutomationPredicates.makeRolePredicate('inlineTextBox'); |
+/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
cvox2.AutomationPredicates.link = |
- cvox2.AutomationPredicates.makeRolePredicate( |
- chrome.automation.RoleType.link); |
+ cvox2.AutomationPredicates.makeRolePredicate('link'); |
/** |
* Possible directions to perform tree traversals. |
@@ -58,11 +55,11 @@ cvox2.AutomationUtil = function() {}; |
/** |
* Find a node in subtree of |cur| satisfying |pred| using pre-order traversal. |
- * @param {AutomationNode} cur Node to begin the search from. |
+ * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
* @param {cvox2.Dir} dir |
- * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
+ * @param {function(chrome.automation.AutomationNode) : boolean} pred A predicate to apply to a |
* candidate node. |
- * @return {AutomationNode} |
+ * @return {chrome.automation.AutomationNode} |
*/ |
cvox2.AutomationUtil.findNodePre = function(cur, dir, pred) { |
if (pred(cur)) |
@@ -80,11 +77,11 @@ cvox2.AutomationUtil.findNodePre = function(cur, dir, pred) { |
/** |
* Find a node in subtree of |cur| satisfying |pred| using post-order traversal. |
- * @param {AutomationNode} cur Node to begin the search from. |
+ * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
* @param {cvox2.Dir} dir |
- * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
+ * @param {function(chrome.automation.AutomationNode) : boolean} pred A predicate to apply to a |
* candidate node. |
- * @return {AutomationNode} |
+ * @return {chrome.automation.AutomationNode} |
*/ |
cvox2.AutomationUtil.findNodePost = function(cur, dir, pred) { |
var child = dir == cvox2.Dir.BACKWARD ? cur.lastChild() : cur.firstChild(); |
@@ -103,9 +100,9 @@ cvox2.AutomationUtil.findNodePost = function(cur, dir, pred) { |
/** |
* Find the next node in the given direction that is either an immediate |
* sibling or a sibling of an ancestor. |
- * @param {AutomationNode} cur Node to start search from. |
+ * @param {chrome.automation.AutomationNode} cur Node to start search from. |
* @param {cvox2.Dir} dir |
- * @return {AutomationNode} |
+ * @return {chrome.automation.AutomationNode} |
*/ |
cvox2.AutomationUtil.findNextSubtree = function(cur, dir) { |
while (cur) { |
@@ -120,11 +117,11 @@ cvox2.AutomationUtil.findNextSubtree = function(cur, dir) { |
/** |
* Find the next node in the given direction in depth first order. |
- * @param {AutomationNode} cur Node to begin the search from. |
+ * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
* @param {cvox2.Dir} dir |
- * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
+ * @param {function(chrome.automation.AutomationNode) : boolean} pred A predicate to apply to a |
* candidate node. |
- * @return {AutomationNode} |
+ * @return {chrome.automation.AutomationNode} |
*/ |
cvox2.AutomationUtil.findNextNode = function(cur, dir, pred) { |
var next = cur; |