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

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

Issue 2085103002: Only process checked state changed for specific roles. (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 unified diff | Download patch
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 // Ignore some roles. 279 // Ignore some roles.
280 return AutomationPredicate.leaf(node) && 280 return AutomationPredicate.leaf(node) &&
281 (node.role == RoleType.client || 281 (node.role == RoleType.client ||
282 node.role == RoleType.div || 282 node.role == RoleType.div ||
283 node.role == RoleType.group || 283 node.role == RoleType.group ||
284 node.role == RoleType.image || 284 node.role == RoleType.image ||
285 node.role == RoleType.staticText); 285 node.role == RoleType.staticText);
286 }; 286 };
287 287
288
289 /**
290 * Returns if the node has a meaningful checked state.
291 * @param {!AutomationNode} node
292 * @return {boolean}
293 */
294 AutomationPredicate.checkable = function(node) {
295 return node.role == RoleType.checkBox ||
296 node.role == RoleType.radioButton ||
297 node.role == RoleType.menuItemCheckBox ||
298 node.role == RoleType.menuItemRadio;
299 };
300
288 }); // goog.scope 301 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698