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

Side by Side Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 1719473002: Fix broken parent->child link in automation webView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/automation_custom_bindings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var AutomationEvent = require('automationEvent').AutomationEvent; 5 var AutomationEvent = require('automationEvent').AutomationEvent;
6 var automationInternal = 6 var automationInternal =
7 require('binding').Binding.create('automationInternal').generate(); 7 require('binding').Binding.create('automationInternal').generate();
8 var exceptionHandler = require('uncaught_exception_handler'); 8 var exceptionHandler = require('uncaught_exception_handler');
9 var IsInteractPermitted = 9 var IsInteractPermitted =
10 requireNative('automationInternal').IsInteractPermitted; 10 requireNative('automationInternal').IsInteractPermitted;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 }, 234 },
235 235
236 boundsForRange: function(startIndex, endIndex) { 236 boundsForRange: function(startIndex, endIndex) {
237 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); 237 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex);
238 }, 238 },
239 239
240 get indexInParent() { 240 get indexInParent() {
241 return GetIndexInParent(this.treeID, this.id); 241 return GetIndexInParent(this.treeID, this.id);
242 }, 242 },
243 243
244 set childTree(node) {
245 this.childTree_ = node;
246 },
247
244 get childTree() { 248 get childTree() {
245 var childTreeID = GetIntAttribute(this.treeID, this.id, 'childTreeId'); 249 return this.childTree_;
246 if (childTreeID)
247 return AutomationRootNodeImpl.get(childTreeID);
248 }, 250 },
249 251
250 get firstChild() { 252 get firstChild() {
251 if (this.childTree) 253 if (this.childTree)
252 return this.childTree; 254 return this.childTree;
253 if (!GetChildCount(this.treeID, this.id)) 255 if (!GetChildCount(this.treeID, this.id))
254 return undefined; 256 return undefined;
255 var firstChildID = GetChildIDAtIndex(this.treeID, this.id, 0); 257 var firstChildID = GetChildIDAtIndex(this.treeID, this.id, 0);
256 return this.rootImpl.get(firstChildID); 258 return this.rootImpl.get(firstChildID);
257 }, 259 },
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 AutomationRootNode.getOrCreate = function(treeID) { 987 AutomationRootNode.getOrCreate = function(treeID) {
986 return AutomationRootNodeImpl.getOrCreate(treeID); 988 return AutomationRootNodeImpl.getOrCreate(treeID);
987 } 989 }
988 990
989 AutomationRootNode.destroy = function(treeID) { 991 AutomationRootNode.destroy = function(treeID) {
990 AutomationRootNodeImpl.destroy(treeID); 992 AutomationRootNodeImpl.destroy(treeID);
991 } 993 }
992 994
993 exports.AutomationNode = AutomationNode; 995 exports.AutomationNode = AutomationNode;
994 exports.AutomationRootNode = AutomationRootNode; 996 exports.AutomationRootNode = AutomationRootNode;
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/automation_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698