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 Simple class to represent a cursor location in the document. | 6 * @fileoverview Simple class to represent a cursor location in the document. |
7 */ | 7 */ |
8 | 8 |
9 goog.provide('cvox.Cursor'); | 9 goog.provide('cvox.Cursor'); |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 this.index = otherCursor.index; | 46 this.index = otherCursor.index; |
47 this.text = otherCursor.text; | 47 this.text = otherCursor.text; |
48 }; | 48 }; |
49 | 49 |
50 /** | 50 /** |
51 * Check for equality. | 51 * Check for equality. |
52 * @param {!cvox.Cursor} rhs The cursor to compare against. | 52 * @param {!cvox.Cursor} rhs The cursor to compare against. |
53 * @return {boolean} True if equal. | 53 * @return {boolean} True if equal. |
54 */ | 54 */ |
55 cvox.Cursor.prototype.equals = function(rhs) { | 55 cvox.Cursor.prototype.equals = function(rhs) { |
56 return this.node == rhs.node && | 56 return this.node == rhs.node && this.index == rhs.index && |
57 this.index == rhs.index && | |
58 this.text == rhs.text; | 57 this.text == rhs.text; |
59 }; | 58 }; |
OLD | NEW |