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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js

Issue 2079073002: Make ChromeVox Next a setting in options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @fileoverview Classes related to cursors that point to and select parts of 6 * @fileoverview Classes related to cursors that point to and select parts of
7 * the automation tree. 7 * the automation tree.
8 */ 8 */
9 9
10 goog.provide('cursors.Cursor'); 10 goog.provide('cursors.Cursor');
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 newNode = newNode || originalNode; 307 newNode = newNode || originalNode;
308 newIndex = goog.isDef(newIndex) ? newIndex : this.index_; 308 newIndex = goog.isDef(newIndex) ? newIndex : this.index_;
309 return new cursors.Cursor(newNode, newIndex); 309 return new cursors.Cursor(newNode, newIndex);
310 }, 310 },
311 311
312 /** 312 /**
313 * Returns whether this cursor points to a valid position. 313 * Returns whether this cursor points to a valid position.
314 * @return {boolean} 314 * @return {boolean}
315 */ 315 */
316 isValid: function() { 316 isValid: function() {
317 return !!this.node && !!this.node.root; 317 return this.node != null;
dmazzoni 2016/06/20 19:49:03 Why this change? Did you not want to check the roo
David Tseng 2016/06/20 22:31:08 Your node recovery getter now does that.
318 } 318 }
319 }; 319 };
320 320
321 /** 321 /**
322 * A cursors.Cursor that wraps from beginning to end and vice versa when moved. 322 * A cursors.Cursor that wraps from beginning to end and vice versa when moved.
323 * @constructor 323 * @constructor
324 * @param {!AutomationNode} node 324 * @param {!AutomationNode} node
325 * @param {number} index A 0-based index into this cursor node's primary 325 * @param {number} index A 0-based index into this cursor node's primary
326 * accessible name. An index of |cursors.NODE_INDEX| means the node as a whole 326 * accessible name. An index of |cursors.NODE_INDEX| means the node as a whole
327 * is pointed to and covers the case where the accessible text is empty. 327 * is pointed to and covers the case where the accessible text is empty.
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 /** 590 /**
591 * Returns whether this range has valid start and end cursors. 591 * Returns whether this range has valid start and end cursors.
592 * @return {boolean} 592 * @return {boolean}
593 */ 593 */
594 isValid: function() { 594 isValid: function() {
595 return this.start.isValid() && this.end.isValid(); 595 return this.start.isValid() && this.end.isValid();
596 } 596 }
597 }; 597 };
598 598
599 }); // goog.scope 599 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698