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 2479893002: Revert of Use setSequentialFocusNavigationStartingPoint in ChromeVox (Closed)
Patch Set: Created 4 years, 1 month 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 /** @type {AutomationPredicate.Unary} */ 94 /** @type {AutomationPredicate.Unary} */
95 AutomationPredicate.formField = AutomationPredicate.match({ 95 AutomationPredicate.formField = AutomationPredicate.match({
96 anyPredicate: [ 96 anyPredicate: [
97 AutomationPredicate.button, 97 AutomationPredicate.button,
98 AutomationPredicate.comboBox, 98 AutomationPredicate.comboBox,
99 AutomationPredicate.editText 99 AutomationPredicate.editText
100 ], 100 ],
101 anyRole: [ 101 anyRole: [
102 Role.checkBox, 102 Role.checkBox,
103 Role.colorWell,
104 Role.listBox, 103 Role.listBox,
105 Role.slider, 104 Role.slider,
106 Role.switch, 105 Role.tab,
107 Role.tree 106 Role.tree
108 ] 107 ]
109 }); 108 });
110 109
111 /** @type {AutomationPredicate.Unary} */
112 AutomationPredicate.control = AutomationPredicate.match({
113 anyPredicate: [
114 AutomationPredicate.formField,
115 ],
116 anyRole: [
117 Role.disclosureTriangle,
118 Role.menuItem,
119 Role.menuItemCheckBox,
120 Role.menuItemRadio,
121 Role.menuListOption,
122 Role.scrollBar,
123 Role.tab
124 ]
125 });
126
127 /** @type {AutomationPredicate.Unary} */
128 AutomationPredicate.linkOrControl = AutomationPredicate.match({
129 anyPredicate: [
130 AutomationPredicate.control
131 ],
132 anyRole: [
133 Role.link
134 ]
135 });
136
137 /** @type {AutomationPredicate.Unary} */ 110 /** @type {AutomationPredicate.Unary} */
138 AutomationPredicate.landmark = AutomationPredicate.roles([ 111 AutomationPredicate.landmark = AutomationPredicate.roles([
139 Role.application, 112 Role.application,
140 Role.banner, 113 Role.banner,
141 Role.complementary, 114 Role.complementary,
142 Role.contentInfo, 115 Role.contentInfo,
143 Role.form, 116 Role.form,
144 Role.main, 117 Role.main,
145 Role.navigation, 118 Role.navigation,
146 Role.region, 119 Role.region,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 * @param {number} level 1-6 425 * @param {number} level 1-6
453 * @return {AutomationPredicate.Unary} 426 * @return {AutomationPredicate.Unary}
454 */ 427 */
455 AutomationPredicate.makeHeadingPredicate = function(level) { 428 AutomationPredicate.makeHeadingPredicate = function(level) {
456 return function(node) { 429 return function(node) {
457 return node.role == Role.heading && node.hierarchicalLevel == level; 430 return node.role == Role.heading && node.hierarchicalLevel == level;
458 }; 431 };
459 }; 432 };
460 433
461 }); // goog.scope 434 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698