Chromium Code Reviews| 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, |
|
Peter Lundblad
2015/11/20 11:15:03
FWIW, the file is consistently wrong when it comes
dmazzoni
2015/11/20 23:35:15
Acknowledged.
|
| + * 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', |