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

Side by Side Diff: chrome/browser/resources/chromeos/switch_access/tree_walker.js

Issue 2939133004: Added to options page to let users change keyboard mappings. (Closed)
Patch Set: Fixed merge conflict and formatting error Created 3 years, 6 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 | « chrome/browser/resources/chromeos/switch_access/switch_access_interface.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 /** 5 /**
6 * Class to move to the appropriate node in the accessibility tree. Stays in a 6 * Class to move to the appropriate node in the accessibility tree. Stays in a
7 * subtree determined by restrictions passed to it. 7 * subtree determined by restrictions passed to it.
8 * 8 *
9 * @constructor 9 * @constructor
10 * @param {!chrome.automation.AutomationNode} start 10 * @param {!chrome.automation.AutomationNode} start
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (node === this.scope_) 138 if (node === this.scope_)
139 return undefined; 139 return undefined;
140 140
141 // Check for left-sibling. If a left-sibling exists, return its youngest 141 // Check for left-sibling. If a left-sibling exists, return its youngest
142 // descendant if it has one, or otherwise return the sibling. 142 // descendant if it has one, or otherwise return the sibling.
143 let sibling = node.previousSibling; 143 let sibling = node.previousSibling;
144 if (sibling) 144 if (sibling)
145 return this.getYoungestDescendant_(sibling) || sibling; 145 return this.getYoungestDescendant_(sibling) || sibling;
146 146
147 // No left-sibling. Return parent if it exists; otherwise return undefined. 147 // No left-sibling. Return parent if it exists; otherwise return undefined.
148 // return node.parent;
149 let parent = node.parent; 148 let parent = node.parent;
150 if (parent) 149 if (parent)
151 return parent; 150 return parent;
152 151
153 return undefined; 152 return undefined;
154 }, 153 },
155 154
156 /** 155 /**
157 * Get the youngest descendant of |node|, if it has one, within the current 156 * Get the youngest descendant of |node|, if it has one, within the current
158 * scope. 157 * scope.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 let parent = node.parent; 243 let parent = node.parent;
245 if (parent) { 244 if (parent) {
246 return parent; 245 return parent;
247 } else { 246 } else {
248 console.log('Node has no parent'); 247 console.log('Node has no parent');
249 console.log('\n'); 248 console.log('\n');
250 return null; 249 return null;
251 } 250 }
252 } 251 }
253 }; 252 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/switch_access/switch_access_interface.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698