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

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

Issue 2092743002: Revert of Make ChromeVox Next a setting in options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/cursors.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
index af31d1710163a1a298ccdb96be15fd8a6ef05481..82dec9cf54646f73909d11158ed5ceca74dd3fbd 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
@@ -314,7 +314,7 @@
* @return {boolean}
*/
isValid: function() {
- return this.node != null;
+ return !!this.node && !!this.node.root;
}
};
@@ -555,13 +555,10 @@
// Find the most common root.
var uniqueAncestors = AutomationUtil.getUniqueAncestors(start, end);
var mcr = start.root;
- if (uniqueAncestors) {
- var common = uniqueAncestors.pop().parent;
- if (common)
- mcr = common.root;
- }
-
- if (!mcr || mcr.role == RoleType.desktop)
+ if (uniqueAncestors)
+ mcr = uniqueAncestors.pop().parent.root;
+
+ if (mcr.role == RoleType.desktop)
return;
if (mcr === start.root && mcr === end.root) {

Powered by Google App Engine
This is Rietveld 408576698