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

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

Issue 2008773002: Begin using ChromeVox Next to read tab and window titles. (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 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 focusOffset: this.end.selectionIndex_ } 527 focusOffset: this.end.selectionIndex_ }
528 ); 528 );
529 } 529 }
530 }, 530 },
531 531
532 /** 532 /**
533 * Returns true if this range has either cursor end on web content. 533 * Returns true if this range has either cursor end on web content.
534 * @return {boolean} 534 * @return {boolean}
535 */ 535 */
536 isWebRange: function() { 536 isWebRange: function() {
537 return this.start.node.root.role != RoleType.desktop || 537 return this.isValid() &&
538 this.end.node.root.role != RoleType.desktop; 538 (this.start.node.root.role != RoleType.desktop ||
539 this.end.node.root.role != RoleType.desktop);
539 }, 540 },
540 541
541 /** 542 /**
542 * Returns whether this range has valid start and end cursors. 543 * Returns whether this range has valid start and end cursors.
543 * @return {boolean} 544 * @return {boolean}
544 */ 545 */
545 isValid: function() { 546 isValid: function() {
546 return this.start.isValid() && this.end.isValid(); 547 return this.start.isValid() && this.end.isValid();
547 } 548 }
548 }; 549 };
549 550
550 }); // goog.scope 551 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698