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

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

Issue 1978373002: Correctly ignore AXTree event creation change state for reparented nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add subtree and node reparented. Created 4 years, 7 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/renderer/extensions/automation_internal_custom_bindings.cc » ('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 Classes related to cursors that point to and select parts of 6 * @fileoverview Classes related to cursors that point to and select parts of
7 * the automation tree. 7 * the automation tree.
8 */ 8 */
9 9
10 goog.provide('cursors.Cursor'); 10 goog.provide('cursors.Cursor');
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 newNode = newNode || this.node_; 284 newNode = newNode || this.node_;
285 newIndex = goog.isDef(newIndex) ? newIndex : this.index_; 285 newIndex = goog.isDef(newIndex) ? newIndex : this.index_;
286 return new cursors.Cursor(newNode, newIndex); 286 return new cursors.Cursor(newNode, newIndex);
287 }, 287 },
288 288
289 /** 289 /**
290 * Returns whether this cursor points to a valid position. 290 * Returns whether this cursor points to a valid position.
291 * @return {boolean} 291 * @return {boolean}
292 */ 292 */
293 isValid: function() { 293 isValid: function() {
294 return this.node.role !== undefined; 294 return !!this.node.root;
295 } 295 }
296 }; 296 };
297 297
298 /** 298 /**
299 * A cursors.Cursor that wraps from beginning to end and vice versa when moved. 299 * A cursors.Cursor that wraps from beginning to end and vice versa when moved.
300 * @constructor 300 * @constructor
301 * @param {!AutomationNode} node 301 * @param {!AutomationNode} node
302 * @param {number} index A 0-based index into this cursor node's primary 302 * @param {number} index A 0-based index into this cursor node's primary
303 * accessible name. An index of |cursors.NODE_INDEX| means the node as a whole 303 * accessible name. An index of |cursors.NODE_INDEX| means the node as a whole
304 * is pointed to and covers the case where the accessible text is empty. 304 * is pointed to and covers the case where the accessible text is empty.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 /** 541 /**
542 * Returns whether this range has valid start and end cursors. 542 * Returns whether this range has valid start and end cursors.
543 * @return {boolean} 543 * @return {boolean}
544 */ 544 */
545 isValid: function() { 545 isValid: function() {
546 return this.start.isValid() && this.end.isValid(); 546 return this.start.isValid() && this.end.isValid();
547 } 547 }
548 }; 548 };
549 549
550 }); // goog.scope 550 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/automation_internal_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698