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

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

Issue 617323002: Revert of Fix ChromeVox Next compile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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 7ff4d68c1438800fc8756917ca05c5cc13d645a1..374052e171147c9c433d201dfd90ee68c7fea818 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 @@
/**
* Constructs a predicate given a role.
* @param {string} role
- * @return {function(chrome.automation.AutomationNode) : boolean}
+ * @return {function(AutomationNode) : boolean}
*/
cvox2.AutomationPredicates.makeRolePredicate = function(role) {
return function(node) {
@@ -26,15 +26,18 @@
};
};
-/** @type {function(chrome.automation.AutomationNode) : boolean} */
+/** @type {function(AutomationNode) : boolean} */
cvox2.AutomationPredicates.heading =
- cvox2.AutomationPredicates.makeRolePredicate('heading');
-/** @type {function(chrome.automation.AutomationNode) : boolean} */
+ cvox2.AutomationPredicates.makeRolePredicate(
+ chrome.automation.RoleType.heading);
+/** @type {function(AutomationNode) : boolean} */
cvox2.AutomationPredicates.inlineTextBox =
- cvox2.AutomationPredicates.makeRolePredicate('inlineTextBox');
-/** @type {function(chrome.automation.AutomationNode) : boolean} */
+ cvox2.AutomationPredicates.makeRolePredicate(
+ chrome.automation.RoleType.inlineTextBox);
+/** @type {function(AutomationNode) : boolean} */
cvox2.AutomationPredicates.link =
- cvox2.AutomationPredicates.makeRolePredicate('link');
+ cvox2.AutomationPredicates.makeRolePredicate(
+ chrome.automation.RoleType.link);
/**
* Possible directions to perform tree traversals.
@@ -55,11 +58,11 @@
/**
* Find a node in subtree of |cur| satisfying |pred| using pre-order traversal.
- * @param {chrome.automation.AutomationNode} cur Node to begin the search from.
+ * @param {AutomationNode} cur Node to begin the search from.
* @param {cvox2.Dir} dir
- * @param {function(chrome.automation.AutomationNode) : boolean} pred A
- * predicate to apply to a candidate node.
- * @return {chrome.automation.AutomationNode}
+ * @param {function(AutomationNode) : boolean} pred A predicate to apply to a
+ * candidate node.
+ * @return {AutomationNode}
*/
cvox2.AutomationUtil.findNodePre = function(cur, dir, pred) {
if (pred(cur))
@@ -77,11 +80,11 @@
/**
* Find a node in subtree of |cur| satisfying |pred| using post-order traversal.
- * @param {chrome.automation.AutomationNode} cur Node to begin the search from.
+ * @param {AutomationNode} cur Node to begin the search from.
* @param {cvox2.Dir} dir
- * @param {function(chrome.automation.AutomationNode) : boolean} pred A
- * predicate to apply to a candidate node.
- * @return {chrome.automation.AutomationNode}
+ * @param {function(AutomationNode) : boolean} pred A predicate to apply to a
+ * candidate node.
+ * @return {AutomationNode}
*/
cvox2.AutomationUtil.findNodePost = function(cur, dir, pred) {
var child = dir == cvox2.Dir.BACKWARD ? cur.lastChild() : cur.firstChild();
@@ -100,9 +103,9 @@
/**
* Find the next node in the given direction that is either an immediate
* sibling or a sibling of an ancestor.
- * @param {chrome.automation.AutomationNode} cur Node to start search from.
+ * @param {AutomationNode} cur Node to start search from.
* @param {cvox2.Dir} dir
- * @return {chrome.automation.AutomationNode}
+ * @return {AutomationNode}
*/
cvox2.AutomationUtil.findNextSubtree = function(cur, dir) {
while (cur) {
@@ -117,11 +120,11 @@
/**
* Find the next node in the given direction in depth first order.
- * @param {chrome.automation.AutomationNode} cur Node to begin the search from.
+ * @param {AutomationNode} cur Node to begin the search from.
* @param {cvox2.Dir} dir
- * @param {function(chrome.automation.AutomationNode) : boolean} pred A
- * predicate to apply to a candidate node.
- * @return {chrome.automation.AutomationNode}
+ * @param {function(AutomationNode) : boolean} pred A predicate to apply to a
+ * candidate node.
+ * @return {AutomationNode}
*/
cvox2.AutomationUtil.findNextNode = function(cur, dir, pred) {
var next = cur;

Powered by Google App Engine
This is Rietveld 408576698