Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js

Issue 405433010: Avoid processing mutations when ChromeVox active indicator moves. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aria-hidden true too Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js
index 78b1eff2e2ac63268bb3f85fd471d48de79649fb..297fcf19407d7d189bae6497926a61bebf0ab58e 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/active_indicator.js
@@ -430,8 +430,8 @@ cvox.ActiveIndicator.prototype.moveIndicator_ = function(
if (window.getComputedStyle(document.body, null).position != 'static') {
offsetX = -document.body.getBoundingClientRect().left;
offsetY = -document.body.getBoundingClientRect().top;
- } else if (window.getComputedStyle(document.documentElement, null).position
- != 'static') {
+ } else if (window.getComputedStyle(document.documentElement, null).position !=
+ 'static') {
offsetX = -document.documentElement.getBoundingClientRect().left;
offsetY = -document.documentElement.getBoundingClientRect().top;
} else {
@@ -828,6 +828,13 @@ cvox.ActiveIndicator.prototype.inset_ = function(r, left, top, right, bottom) {
cvox.ActiveIndicator.prototype.createDiv_ = function(
parent, className, opt_before) {
var elem = document.createElement('div');
+ elem.setAttribute('aria-hidden', 'true');
+
+ // This allows the MutationObserver used for live regions to quickly
+ // ignore changes to this element rather than doing a lot of calculations
+ // first.
+ elem.setAttribute('cvoxIgnore', '');
+
elem.className = className;
if (opt_before) {
parent.insertBefore(elem, opt_before);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698