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

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

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: 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
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; 148 // return node.parent;
149 let parent = node.parent; 149 let parent = node.parent;
150 if (parent) 150 if (parent)
151 return parent; 151 return parent;
152 152
153 return undefined; 153 return undefined;
154 }, 154 },
155 155
156 /** 156 /**
157 * Get the youngest descendant of |node|, if it has one, within the current 157 * Get the youngest descendant of |node|, if it has one, within the current
158 * scope. 158 * scope.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 let parent = node.parent; 244 let parent = node.parent;
245 if (parent) { 245 if (parent) {
246 return parent; 246 return parent;
247 } else { 247 } else {
248 console.log('Node has no parent'); 248 console.log('Node has no parent');
249 console.log('\n'); 249 console.log('\n');
250 return null; 250 return null;
251 } 251 }
252 } 252 }
253 }; 253 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/switch_access/prefs.js ('k') | chrome/browser/resources/chromeos/user_images_grid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698