Chromium Code Reviews| Index: chrome/common/extensions/api/automation.idl |
| diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl |
| index 2c48253a86f695ee4cf2d8bf473f5cb6924041dc..6dfe424c3c1862e069a1435058262f20bc664c2a 100644 |
| --- a/chrome/common/extensions/api/automation.idl |
| +++ b/chrome/common/extensions/api/automation.idl |
| @@ -220,6 +220,14 @@ |
| long height; |
| }; |
| + // The parameters for a <code>query</code>. |
| + dictionary QueryInfo { |
| + DOMString? querySelector; |
| + }; |
| + |
| + // Called when the result for a <code>query</code> is available. |
| + callback QueryCallback = void(AutomationNode node); |
| + |
| // An event in the Automation tree. |
| [nocompile, noinline_doc] dictionary AutomationEvent { |
| // The $(ref:automation.AutomationNode) to which the event was targeted. |
| @@ -292,6 +300,20 @@ |
| // Removes a listener for the given event type and event phase. |
| static void removeEventListener( |
| EventType eventType, AutomationListener listener, boolean capture); |
| + |
| + // Gets the first node in this node's subtree which matches the given CSS |
| + // selector and is within the same DOM context. |
| + // |
| + // If this node doesn't correspond directly with an HTML node in the DOM, |
| + // querySelector will be run on this node's nearest HTML node ancestor. Note |
| + // that this may result in the query returning a node which is not an |
| + // ancestor of this node. |
|
dmazzoni
2014/10/30 23:32:42
nit: ancestor -> descendant
aboxhall
2014/10/31 20:32:22
Oops, done.
|
| + // |
| + // If the selector matches a node which doesn't directly correspond to an |
| + // automation node (for example an element within an ARIA widget, where the |
|
dmazzoni
2014/10/30 23:32:42
Your example doesn't make sense, we don't remove n
aboxhall
2014/10/31 20:32:22
The are ignoredForAccessibility and don't end up i
|
| + // ARIA widget forms one node of the automation tree), this will return the |
| + // nearest ancestor which does correspond to an automation node. |
| + static void querySelector(DOMString selector, QueryCallback callback); |
| }; |
| // Called when the <code>AutomationRootNode</code> for the page is available. |