| Index: chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| index 9cba94914646b0fde747577e1842af2f740fa0d6..f7d955dd835543bb2b15e7692574b38f57c3ee2f 100644
|
| --- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| +++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
|
| @@ -510,10 +510,15 @@ AutomationInternalCustomBindings::AutomationInternalCustomBindings(
|
| // Bindings that take a Tree ID and Node ID and return a property of the node.
|
|
|
| RouteNodeIDFunction(
|
| - "GetParentID", [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result,
|
| - TreeCache* cache, ui::AXNode* node) {
|
| - if (node->parent())
|
| - result.Set(v8::Integer::New(isolate, node->parent()->id()));
|
| + "GetParent", [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result,
|
| + TreeCache* cache, ui::AXNode* node) {
|
| + ui::AXNode* parent = cache->owner->GetParent(node, &cache);
|
| + int parent_node_id = parent->id();
|
| + int parent_tree_id = cache->tree_id;
|
| + v8::Local<v8::Array> array_result(v8::Array::New(isolate, 2));
|
| + array_result->Set(0, v8::Integer::New(isolate, parent_tree_id));
|
| + array_result->Set(1, v8::Integer::New(isolate, parent_node_id));
|
| + result.Set(array_result);
|
| });
|
| RouteNodeIDFunction("GetChildCount", [](v8::Isolate* isolate,
|
| v8::ReturnValue<v8::Value> result,
|
|
|