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

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

Issue 2433823003: Further refine div output when a div receives focus (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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /** @type {AutomationPredicate.Unary} */ 64 /** @type {AutomationPredicate.Unary} */
65 AutomationPredicate.heading = AutomationPredicate.roles([Role.heading]); 65 AutomationPredicate.heading = AutomationPredicate.roles([Role.heading]);
66 /** @type {AutomationPredicate.Unary} */ 66 /** @type {AutomationPredicate.Unary} */
67 AutomationPredicate.inlineTextBox = 67 AutomationPredicate.inlineTextBox =
68 AutomationPredicate.roles([Role.inlineTextBox]); 68 AutomationPredicate.roles([Role.inlineTextBox]);
69 /** @type {AutomationPredicate.Unary} */ 69 /** @type {AutomationPredicate.Unary} */
70 AutomationPredicate.link = AutomationPredicate.roles([Role.link]); 70 AutomationPredicate.link = AutomationPredicate.roles([Role.link]);
71 /** @type {AutomationPredicate.Unary} */ 71 /** @type {AutomationPredicate.Unary} */
72 AutomationPredicate.row = AutomationPredicate.roles([Role.row]); 72 AutomationPredicate.row = AutomationPredicate.roles([Role.row]);
73 /** @type {AutomationPredicate.Unary} */ 73 /** @type {AutomationPredicate.Unary} */
74 AutomationPredicate.staticText = AutomationPredicate.roles([Role.staticText]);
75 /** @type {AutomationPredicate.Unary} */
74 AutomationPredicate.table = AutomationPredicate.roles([Role.grid, Role.table]); 76 AutomationPredicate.table = AutomationPredicate.roles([Role.grid, Role.table]);
75 77
76 /** 78 /**
77 * @param {!AutomationNode} node 79 * @param {!AutomationNode} node
78 * @return {boolean} 80 * @return {boolean}
79 */ 81 */
80 AutomationPredicate.button = function(node) { 82 AutomationPredicate.button = function(node) {
81 return /button/i.test(node.role); 83 return /button/i.test(node.role);
82 }; 84 };
83 85
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 * @param {number} level 1-6 416 * @param {number} level 1-6
415 * @return {AutomationPredicate.Unary} 417 * @return {AutomationPredicate.Unary}
416 */ 418 */
417 AutomationPredicate.makeHeadingPredicate = function(level) { 419 AutomationPredicate.makeHeadingPredicate = function(level) {
418 return function(node) { 420 return function(node) {
419 return node.role == Role.heading && node.hierarchicalLevel == level; 421 return node.role == Role.heading && node.hierarchicalLevel == level;
420 }; 422 };
421 }; 423 };
422 424
423 }); // goog.scope 425 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698