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

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

Issue 2103043003: Remove legacy PDF JSON interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo after merge Created 4 years, 6 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
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 12c86cef50aee4b2c6f5c623e2fbb43371c5ea08..ca604c28a7a57f8198245f5888e8ab708694b13d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -214,14 +214,18 @@ Background.prototype = {
if (!target)
return ChromeVoxMode.CLASSIC;
+ var root = target.root;
+ if (root && this.isWhitelistedForCompat_(root.docUrl))
+ return ChromeVoxMode.COMPAT;
+
// Closure complains, but clearly, |target| is not null.
- var root =
+ var topLevelRoot =
AutomationUtil.getTopLevelRoot(/** @type {!AutomationNode} */(target));
- if (!root)
+ if (!topLevelRoot)
return ChromeVoxMode.COMPAT;
- if (this.isWhitelistedForCompat_(root.docUrl))
+ if (this.isWhitelistedForCompat_(topLevelRoot.docUrl))
return ChromeVoxMode.COMPAT;
- else if (this.isWhitelistedForNext_(root.docUrl))
+ else if (this.isWhitelistedForNext_(topLevelRoot.docUrl))
return ChromeVoxMode.NEXT;
else
return ChromeVoxMode.CLASSIC;

Powered by Google App Engine
This is Rietveld 408576698