| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |