OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Processes events related to editing text and emits the | 6 * @fileoverview Processes events related to editing text and emits the |
7 * appropriate spoken and braille feedback. | 7 * appropriate spoken and braille feedback. |
8 */ | 8 */ |
9 | 9 |
10 goog.provide('editing.TextEditHandler'); | 10 goog.provide('editing.TextEditHandler'); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 } | 353 } |
354 }, | 354 }, |
355 | 355 |
356 /** | 356 /** |
357 * @param {!AutomationNode} style | 357 * @param {!AutomationNode} style |
358 * @param {boolean=} opt_end | 358 * @param {boolean=} opt_end |
359 * @private | 359 * @private |
360 */ | 360 */ |
361 speakTextStyle_: function(style, opt_end) { | 361 speakTextStyle_: function(style, opt_end) { |
362 var msgs = []; | 362 var msgs = []; |
| 363 if (style.state.linked) |
| 364 msgs.push(opt_end ? 'link_end' : 'link_start'); |
363 if (style.bold) | 365 if (style.bold) |
364 msgs.push(opt_end ? 'bold_end' : 'bold_start'); | 366 msgs.push(opt_end ? 'bold_end' : 'bold_start'); |
365 if (style.italic) | 367 if (style.italic) |
366 msgs.push(opt_end ? 'italic_end' : 'italic_start'); | 368 msgs.push(opt_end ? 'italic_end' : 'italic_start'); |
367 if (style.underline) | 369 if (style.underline) |
368 msgs.push(opt_end ? 'underline_end' : 'underline_start'); | 370 msgs.push(opt_end ? 'underline_end' : 'underline_start'); |
369 if (style.lineThrough) | 371 if (style.lineThrough) |
370 msgs.push(opt_end ? 'line_through_end' : 'line_through_start'); | 372 msgs.push(opt_end ? 'line_through_end' : 'line_through_start'); |
371 | 373 |
372 if (msgs.length) { | 374 if (msgs.length) { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 * @return {boolean} | 751 * @return {boolean} |
750 */ | 752 */ |
751 isSameLineAndSelection: function(otherLine) { | 753 isSameLineAndSelection: function(otherLine) { |
752 return this.isSameLine(otherLine) && | 754 return this.isSameLine(otherLine) && |
753 this.startOffset == otherLine.startOffset && | 755 this.startOffset == otherLine.startOffset && |
754 this.endOffset == otherLine.endOffset; | 756 this.endOffset == otherLine.endOffset; |
755 } | 757 } |
756 }; | 758 }; |
757 | 759 |
758 }); | 760 }); |
OLD | NEW |