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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 1458723002: Finish implementing ChromeVox Next active indicator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@load_key_map
Patch Set: Made test expectations approximate Created 5 years, 1 month 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/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index d6eac9203939c4456967da3a50f14dbb51e32ea7..4e3a2d46900fcad1faf5589692d76ff59a975fe3 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -124,6 +124,17 @@ var GetLocation = requireNative('automationInternal').GetLocation;
/**
* @param {number} axTreeID The id of the accessibility tree.
* @param {number} nodeID The id of a node.
+ * @param {number} startIndex The start index of the range.
+ * @param {number} endIndex The end index of the range.
+ * @return {?automation.Rect} The bounding box of the subrange of this node,
+ * or the location if there are no subranges, or undefined if
+ * the tree or node wasn't found.
+ */
+var GetBoundsForRange = requireNative('automationInternal').GetBoundsForRange;
+
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
* @param {string} attr The name of a string attribute.
* @return {?string} The value of this attribute, or undefined if the tree,
* node, or attribute wasn't found.
@@ -222,6 +233,10 @@ AutomationNodeImpl.prototype = {
return GetLocation(this.treeID, this.id);
},
+ boundsForRange: function(startIndex, endIndex) {
+ return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex);
+ },
+
get indexInParent() {
return GetIndexInParent(this.treeID, this.id);
},
@@ -935,7 +950,8 @@ var AutomationNode = utils.expose('AutomationNode',
'addEventListener',
'removeEventListener',
'domQuerySelector',
- 'toString' ],
+ 'toString',
+ 'boundsForRange'],
readonly: publicAttributes.concat(
['parent',
'firstChild',

Powered by Google App Engine
This is Rietveld 408576698