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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js

Issue 2601333002: Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Rebase Created 3 years, 11 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
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js
index f947a066c4d1a248288fda4c48dcef89f11e5023..268ce13edb8180be10d43907391dd8c2d030836a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js
@@ -88,7 +88,7 @@ AutomationTreeWalker = function(node, dir, opt_restrictions) {
* backward.
* @type {chrome.automation.AutomationNode} @private
*/
- this.backwardAncestor_ = node.parent;
+ this.backwardAncestor_ = node.parent || null;
var restrictions = opt_restrictions || {};
this.visitPred_ = function(node) {
@@ -221,8 +221,8 @@ AutomationTreeWalker.prototype = {
}
if (node.parent && this.backwardAncestor_ == node.parent) {
this.phase_ = AutomationTreeWalkerPhase.ANCESTOR;
- this.backwardAncestor_ = node.parent.parent;
+ this.backwardAncestor_ = node.parent.parent || null;
}
- this.node_ = node.parent;
+ this.node_ = node.parent || null;
}
};

Powered by Google App Engine
This is Rietveld 408576698