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

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

Issue 2144593003: Merge dom node and node unit types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 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 | chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
index f054868b831967ccd7c8826b5d814b9260790741..15c561e21183f0c7a925232f8e5ac40462eaf13f 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -168,11 +168,13 @@ AutomationPredicate.leafWithText = function(node) {
};
/**
- * Non-inline textbox nodes which have an equivalent in the DOM.
+ * Matches against leaves or static text nodes. Useful when restricting
+ * traversal to non-inline textboxes while still allowing them if navigation
+ * already entered into an inline textbox.
* @param {!AutomationNode} node
* @return {boolean}
*/
-AutomationPredicate.leafDomNode = function(node) {
+AutomationPredicate.leafOrStaticText = function(node) {
return AutomationPredicate.leaf(node) ||
node.role == RoleType.staticText;
};
@@ -187,7 +189,7 @@ AutomationPredicate.leafDomNode = function(node) {
*/
AutomationPredicate.object = function(node) {
return node.state.focusable ||
- (AutomationPredicate.leafDomNode(node) &&
+ (AutomationPredicate.leafOrStaticText(node) &&
(/\S+/.test(node.name) ||
(node.role != RoleType.lineBreak &&
node.role != RoleType.staticText &&
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698