| 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 goog.provide('cvox.ChromeVoxEditableContentEditable'); | 5 goog.provide('cvox.ChromeVoxEditableContentEditable'); |
| 6 goog.provide('cvox.ChromeVoxEditableElement'); | 6 goog.provide('cvox.ChromeVoxEditableElement'); |
| 7 goog.provide('cvox.ChromeVoxEditableHTMLInput'); | 7 goog.provide('cvox.ChromeVoxEditableHTMLInput'); |
| 8 goog.provide('cvox.ChromeVoxEditableTextArea'); | 8 goog.provide('cvox.ChromeVoxEditableTextArea'); |
| 9 goog.provide('cvox.TextHandlerInterface'); | 9 goog.provide('cvox.TextHandlerInterface'); |
| 10 | 10 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 553 |
| 554 | 554 |
| 555 /** @override */ | 555 /** @override */ |
| 556 cvox.ChromeVoxEditableContentEditable.prototype.changed = | 556 cvox.ChromeVoxEditableContentEditable.prototype.changed = |
| 557 function(evt) { | 557 function(evt) { |
| 558 if (!evt.triggeredByUser) { | 558 if (!evt.triggeredByUser) { |
| 559 return; | 559 return; |
| 560 } | 560 } |
| 561 // Take over here if we can't describe a change; assume it's a blank line. | 561 // Take over here if we can't describe a change; assume it's a blank line. |
| 562 if (!this.shouldDescribeChange(evt)) { | 562 if (!this.shouldDescribeChange(evt)) { |
| 563 this.speak(cvox.ChromeVox.msgs.getMsg('text_box_blank'), true); | 563 this.speak(Msgs.getMsg('text_box_blank'), true); |
| 564 if (this.brailleHandler_) { | 564 if (this.brailleHandler_) { |
| 565 this.brailleHandler_.changed('' /*line*/, 0 /*start*/, 0 /*end*/, | 565 this.brailleHandler_.changed('' /*line*/, 0 /*start*/, 0 /*end*/, |
| 566 true /*multiline*/, null /*element*/, | 566 true /*multiline*/, null /*element*/, |
| 567 evt.start /*lineStart*/); | 567 evt.start /*lineStart*/); |
| 568 } | 568 } |
| 569 } else { | 569 } else { |
| 570 goog.base(this, 'changed', evt); | 570 goog.base(this, 'changed', evt); |
| 571 } | 571 } |
| 572 }; | 572 }; |
| 573 | 573 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 // but there is still content after the new line (like the example | 640 // but there is still content after the new line (like the example |
| 641 // above after "Title"). In these cases, we "pretend" we're the | 641 // above after "Title"). In these cases, we "pretend" we're the |
| 642 // last character so we speak "blank". | 642 // last character so we speak "blank". |
| 643 return false; | 643 return false; |
| 644 } | 644 } |
| 645 | 645 |
| 646 // Otherwise, we should never speak "blank" no matter what (even if | 646 // Otherwise, we should never speak "blank" no matter what (even if |
| 647 // we're at the end of a content editable). | 647 // we're at the end of a content editable). |
| 648 return true; | 648 return true; |
| 649 }; | 649 }; |
| OLD | NEW |