| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 return this.uiSourceCode.project().id() + ':' + this.uiSourceCode.url() + ':
' + this.lineNumber + ':' + | 699 return this.uiSourceCode.project().id() + ':' + this.uiSourceCode.url() + ':
' + this.lineNumber + ':' + |
| 700 this.columnNumber; | 700 this.columnNumber; |
| 701 } | 701 } |
| 702 | 702 |
| 703 /** | 703 /** |
| 704 * @return {string} | 704 * @return {string} |
| 705 */ | 705 */ |
| 706 toUIString() { | 706 toUIString() { |
| 707 return this.uiSourceCode.url() + ':' + (this.lineNumber + 1); | 707 return this.uiSourceCode.url() + ':' + (this.lineNumber + 1); |
| 708 } | 708 } |
| 709 |
| 710 /** |
| 711 * @param {!WebInspector.UILocation} location1 |
| 712 * @param {!WebInspector.UILocation} location2 |
| 713 * @return {number} |
| 714 */ |
| 715 static comparator(location1, location2) { |
| 716 return location1.compareTo(location2); |
| 717 } |
| 718 |
| 719 /** |
| 720 * @param {!WebInspector.UILocation} other |
| 721 * @return {number} |
| 722 */ |
| 723 compareTo(other) { |
| 724 if (this.uiSourceCode.url() !== other.uiSourceCode.url()) |
| 725 return this.uiSourceCode.url() > other.uiSourceCode.url() ? 1 : -1; |
| 726 if (this.lineNumber !== other.lineNumber) |
| 727 return this.lineNumber - other.lineNumber; |
| 728 return this.columnNumber - other.columnNumber; |
| 729 } |
| 709 }; | 730 }; |
| 710 | 731 |
| 711 /** | 732 /** |
| 712 * @implements {WebInspector.ContentProvider} | 733 * @implements {WebInspector.ContentProvider} |
| 713 * @unrestricted | 734 * @unrestricted |
| 714 */ | 735 */ |
| 715 WebInspector.Revision = class { | 736 WebInspector.Revision = class { |
| 716 /** | 737 /** |
| 717 * @param {!WebInspector.UISourceCode} uiSourceCode | 738 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 718 * @param {?string|undefined} content | 739 * @param {?string|undefined} content |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 WebInspector.UISourceCodeMetadata = class { | 942 WebInspector.UISourceCodeMetadata = class { |
| 922 /** | 943 /** |
| 923 * @param {?Date} modificationTime | 944 * @param {?Date} modificationTime |
| 924 * @param {?number} contentSize | 945 * @param {?number} contentSize |
| 925 */ | 946 */ |
| 926 constructor(modificationTime, contentSize) { | 947 constructor(modificationTime, contentSize) { |
| 927 this.modificationTime = modificationTime; | 948 this.modificationTime = modificationTime; |
| 928 this.contentSize = contentSize; | 949 this.contentSize = contentSize; |
| 929 } | 950 } |
| 930 }; | 951 }; |
| OLD | NEW |