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

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

Issue 2085433003: Ignore listMarker nodes and sync from left to right after a jump command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview ChromeVox predicates for the automation extension API. 6 * @fileoverview ChromeVox predicates for the automation extension API.
7 */ 7 */
8 8
9 goog.provide('AutomationPredicate'); 9 goog.provide('AutomationPredicate');
10 goog.provide('AutomationPredicate.Binary'); 10 goog.provide('AutomationPredicate.Binary');
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 AutomationPredicate.shouldIgnoreNode = function(node) { 265 AutomationPredicate.shouldIgnoreNode = function(node) {
266 // Ignore invisible nodes. 266 // Ignore invisible nodes.
267 if (node.state.invisible || 267 if (node.state.invisible ||
268 (node.location.height == 0 && node.location.width == 0)) 268 (node.location.height == 0 && node.location.width == 0))
269 return true; 269 return true;
270 270
271 // Ignore structural containres. 271 // Ignore structural containres.
272 if (AutomationPredicate.structuralContainer(node)) 272 if (AutomationPredicate.structuralContainer(node))
273 return true; 273 return true;
274 274
275 // Ignore list markers since we already announce listitem role.
276 if (node.role == RoleType.listMarker)
277 return true;
278
275 // Don't ignore nodes with names. 279 // Don't ignore nodes with names.
276 if (node.name || node.value || node.description) 280 if (node.name || node.value || node.description)
277 return false; 281 return false;
278 282
279 // Ignore some roles. 283 // Ignore some roles.
280 return AutomationPredicate.leaf(node) && 284 return AutomationPredicate.leaf(node) &&
281 (node.role == RoleType.client || 285 (node.role == RoleType.client ||
282 node.role == RoleType.div || 286 node.role == RoleType.div ||
283 node.role == RoleType.group || 287 node.role == RoleType.group ||
284 node.role == RoleType.image || 288 node.role == RoleType.image ||
285 node.role == RoleType.staticText); 289 node.role == RoleType.staticText);
286 }; 290 };
287 291
288 }); // goog.scope 292 }); // goog.scope
OLDNEW
« 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