Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js |
index 9d2a6b4b25fc13bdea8fb336afe8d4e68072ba32..67cd71fea88c2316d8bb2366ceaa8e4ade9c3391 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/next_earcons.js |
@@ -43,12 +43,18 @@ NextEarcons.prototype = { |
/** |
* @override |
*/ |
- playEarcon: function(earcon) { |
+ playEarcon: function(earcon, opt_location) { |
if (!cvox.AbstractEarcons.enabled) { |
return; |
} |
console.log('Earcon ' + earcon); |
- |
+ if (ChromeVoxState.instance.currentRange && |
+ ChromeVoxState.instance.currentRange.isValid()) { |
+ var node = ChromeVoxState.instance.currentRange.start.node; |
+ var rect = opt_location || node.location; |
+ var container = node.root.location; |
+ this.engine_.setPositionForRect(rect, container); |
+ } |
switch (earcon) { |
case cvox.Earcon.ALERT_MODAL: |
case cvox.Earcon.ALERT_NONMODAL: |