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

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

Issue 1513933005: Reland: Make the check for compat mode explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 newStart = newStart.move(unit, Movement.BOUND, Dir.BACKWARD); 426 newStart = newStart.move(unit, Movement.BOUND, Dir.BACKWARD);
427 newEnd = newStart.move(unit, Movement.BOUND, Dir.FORWARD); 427 newEnd = newStart.move(unit, Movement.BOUND, Dir.FORWARD);
428 break; 428 break;
429 case Unit.NODE: 429 case Unit.NODE:
430 case Unit.DOM_NODE: 430 case Unit.DOM_NODE:
431 newStart = newStart.move(unit, Movement.DIRECTIONAL, dir); 431 newStart = newStart.move(unit, Movement.DIRECTIONAL, dir);
432 newEnd = newStart; 432 newEnd = newStart;
433 break; 433 break;
434 } 434 }
435 return new cursors.Range(newStart, newEnd); 435 return new cursors.Range(newStart, newEnd);
436 },
437
438 /**
439 * Returns true if this range has either cursor end on web content.
440 * @return {boolean}
441 */
442 isWebRange: function() {
443 return this.start.node.root.role != Role.desktop ||
444 this.end.node.root.role != Role.desktop;
436 } 445 }
437 }; 446 };
438 447
439 }); // goog.scope 448 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698