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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 2443273002: Fix next compat to convey state for classic. (Closed)
Patch Set: Fix next compat to convey state for classic. Created 4 years, 2 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/cvox2/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index da65208f2ba68c0b2d373f8c8b50f83dc116c6db..b35de90fd1f5cdbc3c93471a22d5cf5b73a42f00 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -74,7 +74,7 @@ Background = function() {
* @type {RegExp}
* @private
*/
- this.NextCompatRegExp_ = Background.globsToRegExp_([
+ this.nextCompatRegExp_ = Background.globsToRegExp_([
'*docs.google.com*'
]);
@@ -250,7 +250,7 @@ Background.prototype = {
ChromeVoxMode.CLASSIC_COMPAT;
var nextSite = this.isWhitelistedForNext_(topLevelRoot.docUrl);
- var nextCompat = this.NextCompatRegExp_.test(topLevelRoot.docUrl);
+ var nextCompat = this.nextCompatRegExp_.test(topLevelRoot.docUrl);
var classicCompat =
this.isWhitelistedForClassicCompat_(topLevelRoot.docUrl);
if (nextCompat && useNext)
@@ -560,9 +560,10 @@ Background.prototype = {
* @private
*/
shouldEnableClassicForUrl_: function(url) {
- return this.mode != ChromeVoxMode.FORCE_NEXT &&
- !this.isBlacklistedForClassic_(url) &&
- !this.isWhitelistedForNext_(url);
+ return this.nextCompatRegExp_.test(url) ||
+ (this.mode != ChromeVoxMode.FORCE_NEXT &&
+ !this.isBlacklistedForClassic_(url) &&
+ !this.isWhitelistedForNext_(url));
},
/**
@@ -617,7 +618,7 @@ Background.prototype = {
};
if (params.forNextCompat) {
- var reStr = this.NextCompatRegExp_.toString();
+ var reStr = this.nextCompatRegExp_.toString();
disableChromeVoxCommand['excludeUrlRegExp'] =
reStr.substring(1, reStr.length - 1);
}
« 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