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

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

Issue 1948213002: Add a |skipInitialAncestry| option to tree walking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 9583ece160470b68c050a698335651e00d982f19..f9768fa3c9c2e5c973541a25bc1f4bd5aaf6274a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -679,7 +679,12 @@ Background.prototype = {
if (pred) {
var node = AutomationUtil.findNextNode(
- current.getBound(dir).node, dir, pred);
+ current.getBound(dir).node, dir, pred, {skipInitialAncestry: true});
+
+ if (node) {
+ node = AutomationUtil.findNodePre(
+ node, dir, AutomationPredicate.element) || node;
+ }
if (node) {
current = cursors.Range.fromNode(node);

Powered by Google App Engine
This is Rietveld 408576698