OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Object describing the printable area of a page in the document. | 9 * Object describing the printable area of a page in the document. |
10 * @param {!print_preview.Coordinate2d} origin Top left corner of the | 10 * @param {!print_preview.Coordinate2d} origin Top left corner of the |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 get size() { | 44 get size() { |
45 return this.size_; | 45 return this.size_; |
46 }, | 46 }, |
47 | 47 |
48 /** | 48 /** |
49 * @param {print_preview.PrintableArea} other Other printable area to check | 49 * @param {print_preview.PrintableArea} other Other printable area to check |
50 * for equality. | 50 * for equality. |
51 * @return {boolean} Whether another printable area is equal to this one. | 51 * @return {boolean} Whether another printable area is equal to this one. |
52 */ | 52 */ |
53 equals: function(other) { | 53 equals: function(other) { |
54 return other != null && | 54 return other != null && this.origin_.equals(other.origin_) && |
55 this.origin_.equals(other.origin_) && | |
56 this.size_.equals(other.size_); | 55 this.size_.equals(other.size_); |
57 } | 56 } |
58 }; | 57 }; |
59 | 58 |
60 // Export | 59 // Export |
61 return { | 60 return {PrintableArea: PrintableArea}; |
62 PrintableArea: PrintableArea | |
63 }; | |
64 }); | 61 }); |
OLD | NEW |