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

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

Issue 944063002: Revert "Allow aria live regions to be announced when observed on a background tab." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js ('k') | 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/live_regions.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
index 914769276f16e62c3cd83ca90203eae9bcc40b36..2cb2c2efb781afb18823f713b35dd240016caa74 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
@@ -61,14 +61,6 @@ cvox.LiveRegions.lastAnnouncedMap = {};
cvox.LiveRegions.MAX_DISCARD_DUPS_MS = 2000;
/**
- * Maximum time interval in which to discard duplicate live region announcement
- * when document.webkitHidden.
- * @type {number}
- * @const
- */
-cvox.LiveRegions.HIDDEN_DOC_MAX_DISCARD_DUPS_MS = 60000;
-
-/**
* @type {Date}
*/
cvox.LiveRegions.lastAnnouncedTime = null;
@@ -367,14 +359,11 @@ cvox.LiveRegions.announceChange = function(
}
}
- var discardDupsMs = document.webkitHidden ?
- cvox.LiveRegions.HIDDEN_DOC_MAX_DISCARD_DUPS_MS :
- cvox.LiveRegions.MAX_DISCARD_DUPS_MS;
-
// First, evict expired entries.
var now = new Date();
for (var announced in cvox.LiveRegions.lastAnnouncedMap) {
- if (now - cvox.LiveRegions.lastAnnouncedMap[announced] > discardDupsMs) {
+ if (now - cvox.LiveRegions.lastAnnouncedMap[announced] >
+ cvox.LiveRegions.MAX_DISCARD_DUPS_MS) {
delete cvox.LiveRegions.lastAnnouncedMap[announced];
}
}
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698