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

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

Issue 2903973002: Rich editable text implementation using spannables (Closed)
Patch Set: Make boolean expressions explicit. 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 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 Provides output services for ChromeVox. 6 * @fileoverview Provides output services for ChromeVox.
7 */ 7 */
8 8
9 goog.provide('Output'); 9 goog.provide('Output');
10 goog.provide('Output.EventType'); 10 goog.provide('Output.EventType');
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return node[attrib] !== undefined || node.state[attrib]; 762 return node[attrib] !== undefined || node.state[attrib];
763 } 763 }
764 }; 764 };
765 765
766 Output.prototype = { 766 Output.prototype = {
767 /** 767 /**
768 * @return {boolean} True if there's any speech that will be output. 768 * @return {boolean} True if there's any speech that will be output.
769 */ 769 */
770 get hasSpeech() { 770 get hasSpeech() {
771 for (var i = 0; i < this.speechBuffer_.length; i++) { 771 for (var i = 0; i < this.speechBuffer_.length; i++) {
772 if (this.speechBuffer_[i].trim().length) 772 if (this.speechBuffer_[i].length)
773 return true; 773 return true;
774 } 774 }
775 return false; 775 return false;
776 }, 776 },
777 777
778 /** 778 /**
779 * Specify ranges for speech. 779 * Specify ranges for speech.
780 * @param {!cursors.Range} range 780 * @param {!cursors.Range} range
781 * @param {cursors.Range} prevRange 781 * @param {cursors.Range} prevRange
782 * @param {EventType|Output.EventType} type 782 * @param {EventType|Output.EventType} type
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 /** 1910 /**
1911 * Gets the output buffer for braille. 1911 * Gets the output buffer for braille.
1912 * @return {!Spannable} 1912 * @return {!Spannable}
1913 */ 1913 */
1914 get brailleOutputForTest() { 1914 get brailleOutputForTest() {
1915 return this.mergeBraille_(this.brailleBuffer_); 1915 return this.mergeBraille_(this.brailleBuffer_);
1916 } 1916 }
1917 }; 1917 };
1918 1918
1919 }); // goog.scope 1919 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698