| OLD | NEW |
| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 * @return {boolean} | 306 * @return {boolean} |
| 307 */ | 307 */ |
| 308 AutomationPredicate.structuralContainer = AutomationPredicate.roles([ | 308 AutomationPredicate.structuralContainer = AutomationPredicate.roles([ |
| 309 Role.ALERT_DIALOG, | 309 Role.ALERT_DIALOG, |
| 310 Role.DIALOG, | 310 Role.DIALOG, |
| 311 Role.ROOT_WEB_AREA, | 311 Role.ROOT_WEB_AREA, |
| 312 Role.WEB_VIEW, | 312 Role.WEB_VIEW, |
| 313 Role.WINDOW, | 313 Role.WINDOW, |
| 314 Role.EMBEDDED_OBJECT, | 314 Role.EMBEDDED_OBJECT, |
| 315 Role.IFRAME, | 315 Role.IFRAME, |
| 316 Role.IFRAME_PRESENTATIONAL]); | 316 Role.IFRAME_PRESENTATIONAL, |
| 317 Role.UNKNOWN]); |
| 317 | 318 |
| 318 /** | 319 /** |
| 319 * Returns whether the given node should not be crossed when performing | 320 * Returns whether the given node should not be crossed when performing |
| 320 * traversals up the ancestry chain. | 321 * traversals up the ancestry chain. |
| 321 * @param {AutomationNode} node | 322 * @param {AutomationNode} node |
| 322 * @return {boolean} | 323 * @return {boolean} |
| 323 */ | 324 */ |
| 324 AutomationPredicate.root = function(node) { | 325 AutomationPredicate.root = function(node) { |
| 325 switch (node.role) { | 326 switch (node.role) { |
| 326 case Role.WINDOW: | 327 case Role.WINDOW: |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 * Matches against nodes that we may be able to retrieve image data from. | 491 * Matches against nodes that we may be able to retrieve image data from. |
| 491 * @param {!AutomationNode} node | 492 * @param {!AutomationNode} node |
| 492 * @return {boolean} | 493 * @return {boolean} |
| 493 */ | 494 */ |
| 494 AutomationPredicate.supportsImageData = AutomationPredicate.roles([ | 495 AutomationPredicate.supportsImageData = AutomationPredicate.roles([ |
| 495 Role.CANVAS, | 496 Role.CANVAS, |
| 496 Role.IMAGE, | 497 Role.IMAGE, |
| 497 Role.VIDEO]); | 498 Role.VIDEO]); |
| 498 | 499 |
| 499 }); // goog.scope | 500 }); // goog.scope |
| OLD | NEW |