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

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

Issue 2557713003: Don't consider large static text nodes as objects (Closed)
Patch Set: Don't consider large static text ndoes as objects Created 4 years 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/constants.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 098ea678ecf0dad4f5d8af0fb73e2b58b115dcef..7be6f0c1802dcf440693654a60113849f385bfe6 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -223,6 +223,10 @@ AutomationPredicate.object = function(node) {
if (node.parent && node.parent.state.editable)
return false;
+ // Descend into large nodes.
+ if (node.name && node.name.length > constants.OBJECT_MAX_CHARCOUNT)
+ return false;
+
return node.state.focusable ||
(AutomationPredicate.leafOrStaticText(node) &&
(/\S+/.test(node.name) ||
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698