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

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

Issue 2403113002: Ignore svgRoot nodes. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 return false; 304 return false;
305 305
306 // Ignore some roles. 306 // Ignore some roles.
307 return AutomationPredicate.leaf(node) && 307 return AutomationPredicate.leaf(node) &&
308 (AutomationPredicate.roles([Role.client, 308 (AutomationPredicate.roles([Role.client,
309 Role.column, 309 Role.column,
310 Role.div, 310 Role.div,
311 Role.group, 311 Role.group,
312 Role.image, 312 Role.image,
313 Role.staticText, 313 Role.staticText,
314 Role.svgRoot,
314 Role.tableHeaderContainer])(node)); 315 Role.tableHeaderContainer])(node));
315 }; 316 };
316 317
317 /** 318 /**
318 * Returns if the node has a meaningful checked state. 319 * Returns if the node has a meaningful checked state.
319 * @param {!AutomationNode} node 320 * @param {!AutomationNode} node
320 * @return {boolean} 321 * @return {boolean}
321 */ 322 */
322 AutomationPredicate.checkable = AutomationPredicate.roles([ 323 AutomationPredicate.checkable = AutomationPredicate.roles([
323 Role.checkBox, 324 Role.checkBox,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 * @param {number} level 1-6 414 * @param {number} level 1-6
414 * @return {AutomationPredicate.Unary} 415 * @return {AutomationPredicate.Unary}
415 */ 416 */
416 AutomationPredicate.makeHeadingPredicate = function(level) { 417 AutomationPredicate.makeHeadingPredicate = function(level) {
417 return function(node) { 418 return function(node) {
418 return node.role == Role.heading && node.hierarchicalLevel == level; 419 return node.role == Role.heading && node.hierarchicalLevel == level;
419 }; 420 };
420 }; 421 };
421 422
422 }); // goog.scope 423 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698