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

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

Issue 2243463002: Make ChromeVox navigation 100x faster on some sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 357f192146963438d3dcb199b4fe57ff25cb7bac..d24c2d606ae22156a2ef6c011cc101c76aa3d861 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -307,18 +307,22 @@ AutomationNodeImpl.prototype = {
get previousSibling() {
var parent = this.parent;
+ if (!parent)
+ return undefined;
+ parent = privates(parent).impl;
var indexInParent = GetIndexInParent(this.treeID, this.id);
- if (parent && indexInParent > 0)
- return parent.children[indexInParent - 1];
- return undefined;
+ return this.rootImpl.get(
+ GetChildIDAtIndex(parent.treeID, parent.id, indexInParent - 1));
},
get nextSibling() {
var parent = this.parent;
+ if (!parent)
+ return undefined;
+ parent = privates(parent).impl;
var indexInParent = GetIndexInParent(this.treeID, this.id);
- if (parent && indexInParent < parent.children.length)
- return parent.children[indexInParent + 1];
- return undefined;
+ return this.rootImpl.get(
+ GetChildIDAtIndex(parent.treeID, parent.id, indexInParent + 1));
},
doDefault: function() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698