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

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

Issue 674263003: Add remaining text/caret navigation commands to ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@integrate_cursor
Patch Set: Add comments. Created 6 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
« 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 /** 53 /**
54 * @param {chrome.automation.AutomationNode} node 54 * @param {chrome.automation.AutomationNode} node
55 * @return {boolean} 55 * @return {boolean}
56 */ 56 */
57 AutomationPredicate.leaf = function(node) { 57 AutomationPredicate.leaf = function(node) {
58 return !node.firstChild(); 58 return !node.firstChild();
59 }; 59 };
60 60
61 /** 61 /**
62 * @param {chrome.automation.AutomationNode} node
63 * @return {boolean}
64 */
65 AutomationPredicate.leafWithText = function(node) {
66 return AutomationPredicate.leaf(node) &&
67 !!(node.attributes.name || node.attributes.value);
68 };
69
70 /**
62 * @param {chrome.automation.AutomationNode} first 71 * @param {chrome.automation.AutomationNode} first
63 * @param {chrome.automation.AutomationNode} second 72 * @param {chrome.automation.AutomationNode} second
64 * @return {boolean} 73 * @return {boolean}
65 */ 74 */
66 AutomationPredicate.linebreak = function(first, second) { 75 AutomationPredicate.linebreak = function(first, second) {
67 // TODO(dtseng): Use next/previousOnLin once available. 76 // TODO(dtseng): Use next/previousOnLin once available.
68 var fl = first.location; 77 var fl = first.location;
69 var sl = second.location; 78 var sl = second.location;
70 return fl.top != sl.top || 79 return fl.top != sl.top ||
71 (fl.top + fl.height != sl.top + sl.height); 80 (fl.top + fl.height != sl.top + sl.height);
72 }; 81 };
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