| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 return node[attrib] !== undefined || node.state[attrib]; | 744 return node[attrib] !== undefined || node.state[attrib]; |
| 745 } | 745 } |
| 746 }; | 746 }; |
| 747 | 747 |
| 748 Output.prototype = { | 748 Output.prototype = { |
| 749 /** | 749 /** |
| 750 * @return {boolean} True if there's any speech that will be output. | 750 * @return {boolean} True if there's any speech that will be output. |
| 751 */ | 751 */ |
| 752 get hasSpeech() { | 752 get hasSpeech() { |
| 753 for (var i = 0; i < this.speechBuffer_.length; i++) { | 753 for (var i = 0; i < this.speechBuffer_.length; i++) { |
| 754 if (this.speechBuffer_[i].trim().length) | 754 if (this.speechBuffer_[i].length) |
| 755 return true; | 755 return true; |
| 756 } | 756 } |
| 757 return false; | 757 return false; |
| 758 }, | 758 }, |
| 759 | 759 |
| 760 /** | 760 /** |
| 761 * Specify ranges for speech. | 761 * Specify ranges for speech. |
| 762 * @param {!cursors.Range} range | 762 * @param {!cursors.Range} range |
| 763 * @param {cursors.Range} prevRange | 763 * @param {cursors.Range} prevRange |
| 764 * @param {EventType|Output.EventType} type | 764 * @param {EventType|Output.EventType} type |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 /** | 1894 /** |
| 1895 * Gets the output buffer for braille. | 1895 * Gets the output buffer for braille. |
| 1896 * @return {!Spannable} | 1896 * @return {!Spannable} |
| 1897 */ | 1897 */ |
| 1898 get brailleOutputForTest() { | 1898 get brailleOutputForTest() { |
| 1899 return this.mergeBraille_(this.brailleBuffer_); | 1899 return this.mergeBraille_(this.brailleBuffer_); |
| 1900 } | 1900 } |
| 1901 }; | 1901 }; |
| 1902 | 1902 |
| 1903 }); // goog.scope | 1903 }); // goog.scope |
| OLD | NEW |