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