| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| index 8ed859910107f395586c6114b830a2e9a0291c85..909a0aa63c3d93c1cb0350a18fe4dd0b4193575d 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| @@ -41,9 +41,12 @@ var Dir = AutomationUtil.Dir;
|
| * @param {!cursors.Range} range
|
| * @param {cursors.Range} prevRange
|
| * @param {chrome.automation.EventType|Output.EventType} type
|
| + * @param {{braille: (boolean|undefined), speech: (boolean|undefined)}=}
|
| + * opt_options
|
| * @constructor
|
| */
|
| -Output = function(range, prevRange, type) {
|
| +Output = function(range, prevRange, type, opt_options) {
|
| + opt_options = opt_options || {braille: true, speech: true};
|
| // TODO(dtseng): Include braille specific rules.
|
| /** @type {!cvox.Spannable} */
|
| this.buffer_ = new cvox.Spannable();
|
| @@ -59,8 +62,10 @@ Output = function(range, prevRange, type) {
|
| this.formatOptions_ = {speech: true, braille: false, location: true};
|
|
|
| this.render_(range, prevRange, type);
|
| - this.handleSpeech();
|
| - this.handleBraille();
|
| + if (opt_options.speech)
|
| + this.handleSpeech();
|
| + if (opt_options.braille)
|
| + this.handleBraille();
|
| this.handleDisplay();
|
| };
|
|
|
| @@ -93,6 +98,9 @@ Output.RULES = {
|
| '$earcon(CHECK_ON, @input_type_checkbox), ' +
|
| '$earcon(CHECK_OFF, @input_type_checkbox))'
|
| },
|
| + dialog: {
|
| + enter: '$name $role'
|
| + },
|
| heading: {
|
| enter: '@aria_role_heading',
|
| speak: '@aria_role_heading $name='
|
| @@ -147,7 +155,11 @@ Output.RULES = {
|
| textField: {
|
| speak: '$name $value $earcon(EDITABLE_TEXT, @input_type_text)'
|
| },
|
| + toolbar: {
|
| + enter: '$name $role'
|
| + },
|
| window: {
|
| + enter: '$name',
|
| speak: '@describe_window($name) $earcon(OBJECT_OPEN)'
|
| }
|
| },
|
| @@ -392,7 +404,7 @@ Output.prototype = {
|
| */
|
| range_: function(range, prevRange, type, rangeBuff) {
|
| if (!prevRange)
|
| - prevRange = range;
|
| + prevRange = cursors.Range.fromNode(range.getStart().getNode().root);
|
|
|
| var cursor = range.getStart();
|
| var prevNode = prevRange.getStart().getNode();
|
|
|