| 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 d2599e1f2934c41044e31ca0d5707ee712a343c2..03a9ee9732ed469b63f455501a5cf33444f78315 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
|
| @@ -94,6 +94,12 @@ Output = function() {
|
| * @private
|
| */
|
| this.outputContextFirst_ = false;
|
| +
|
| + /**
|
| + * @type {string}
|
| + * @private
|
| + */
|
| + this.imageDataUrl_ = '';
|
| };
|
|
|
| /**
|
| @@ -941,13 +947,16 @@ Output.prototype = {
|
| buff.setSpan(new cvox.ValueSelectionSpan(), startIndex, endIndex);
|
| }
|
|
|
| - var output = new cvox.NavBraille({
|
| - text: buff,
|
| - startIndex: startIndex,
|
| - endIndex: endIndex
|
| - });
|
| -
|
| - cvox.ChromeVox.braille.write(output);
|
| + if (this.imageDataUrl_) {
|
| + cvox.ChromeVox.braille.writeRawImage(this.imageDataUrl_);
|
| + } else {
|
| + var output = new cvox.NavBraille({
|
| + text: buff,
|
| + startIndex: startIndex,
|
| + endIndex: endIndex
|
| + });
|
| + cvox.ChromeVox.braille.write(output);
|
| + }
|
| }
|
|
|
| // Display.
|
| @@ -1003,6 +1012,14 @@ Output.prototype = {
|
| var tokens = [];
|
| var args = null;
|
|
|
| + if (node != null &&
|
| + (node.role == RoleType.canvas || node.role == RoleType.image)) {
|
| + if (node.imageDataUrl)
|
| + this.imageDataUrl_ = node.imageDataUrl;
|
| + else
|
| + node.getImageData(0, 0);
|
| + }
|
| +
|
| // Hacky way to support args.
|
| if (typeof(format) == 'string') {
|
| format = format.replace(/([,:])\W/g, '$1');
|
|
|