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

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

Issue 1622803002: Cleanup AutomationUtil.findNodeUntil, fix wrapping when moving by line, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 * @param {!AutomationNode} node 136 * @param {!AutomationNode} node
137 * @return {boolean} 137 * @return {boolean}
138 */ 138 */
139 AutomationPredicate.leaf = function(node) { 139 AutomationPredicate.leaf = function(node) {
140 return !node.firstChild || 140 return !node.firstChild ||
141 node.role == RoleType.button || 141 node.role == RoleType.button ||
142 node.role == RoleType.buttonDropDown || 142 node.role == RoleType.buttonDropDown ||
143 node.role == RoleType.popUpButton || 143 node.role == RoleType.popUpButton ||
144 node.role == RoleType.slider || 144 node.role == RoleType.slider ||
145 node.role == RoleType.textField || 145 node.role == RoleType.textField ||
146 node.state.invisible ||
146 node.children.every(function(n) { 147 node.children.every(function(n) {
147 return n.state.invisible; 148 return n.state.invisible;
148 }); 149 });
149 }; 150 };
150 151
151 /** 152 /**
152 * @param {!AutomationNode} node 153 * @param {!AutomationNode} node
153 * @return {boolean} 154 * @return {boolean}
154 */ 155 */
155 AutomationPredicate.leafWithText = function(node) { 156 AutomationPredicate.leafWithText = function(node) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 219
219 return AutomationPredicate.leaf(node) && 220 return AutomationPredicate.leaf(node) &&
220 (node.role == RoleType.client || 221 (node.role == RoleType.client ||
221 node.role == RoleType.div || 222 node.role == RoleType.div ||
222 node.role == RoleType.group || 223 node.role == RoleType.group ||
223 node.role == RoleType.image || 224 node.role == RoleType.image ||
224 node.role == RoleType.staticText); 225 node.role == RoleType.staticText);
225 }; 226 };
226 227
227 }); // goog.scope 228 }); // 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