| 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 27 matching lines...) Expand all Loading... |
| 38 */ | 38 */ |
| 39 editing.TextEditHandler = function(node) { | 39 editing.TextEditHandler = function(node) { |
| 40 /** @const {!AutomationNode} @private */ | 40 /** @const {!AutomationNode} @private */ |
| 41 this.node_ = node; | 41 this.node_ = node; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * Flag set to indicate whether ChromeVox uses experimental rich text support. | 45 * Flag set to indicate whether ChromeVox uses experimental rich text support. |
| 46 * @type {boolean} | 46 * @type {boolean} |
| 47 */ | 47 */ |
| 48 editing.useRichText = false; | 48 editing.useRichText = true; |
| 49 | 49 |
| 50 editing.TextEditHandler.prototype = { | 50 editing.TextEditHandler.prototype = { |
| 51 /** @return {!AutomationNode} */ | 51 /** @return {!AutomationNode} */ |
| 52 get node() { | 52 get node() { |
| 53 return this.node_; | 53 return this.node_; |
| 54 }, | 54 }, |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Receives the following kinds of events when the node provided to the | 57 * Receives the following kinds of events when the node provided to the |
| 58 * constructor is focuse: |focus|, |textChanged|, |textSelectionChanged| and | 58 * constructor is focuse: |focus|, |textChanged|, |textSelectionChanged| and |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 * @return {boolean} | 749 * @return {boolean} |
| 750 */ | 750 */ |
| 751 isSameLineAndSelection: function(otherLine) { | 751 isSameLineAndSelection: function(otherLine) { |
| 752 return this.isSameLine(otherLine) && | 752 return this.isSameLine(otherLine) && |
| 753 this.startOffset == otherLine.startOffset && | 753 this.startOffset == otherLine.startOffset && |
| 754 this.endOffset == otherLine.endOffset; | 754 this.endOffset == otherLine.endOffset; |
| 755 } | 755 } |
| 756 }; | 756 }; |
| 757 | 757 |
| 758 }); | 758 }); |
| OLD | NEW |