| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 /** | 48 /** |
| 49 * @param {number} line | 49 * @param {number} line |
| 50 * @param {number} column | 50 * @param {number} column |
| 51 * @return {!WebInspector.TextRange} | 51 * @return {!WebInspector.TextRange} |
| 52 */ | 52 */ |
| 53 static createFromLocation(line, column) { | 53 static createFromLocation(line, column) { |
| 54 return new WebInspector.TextRange(line, column, line, column); | 54 return new WebInspector.TextRange(line, column, line, column); |
| 55 } | 55 } |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * @param {number} line |
| 59 * @return {!WebInspector.TextRange} |
| 60 */ |
| 61 static createFromLine(line) { |
| 62 return new WebInspector.TextRange(line, 0, line + 1, 0); |
| 63 } |
| 64 |
| 65 /** |
| 58 * @param {!Object} serializedTextRange | 66 * @param {!Object} serializedTextRange |
| 59 * @return {!WebInspector.TextRange} | 67 * @return {!WebInspector.TextRange} |
| 60 */ | 68 */ |
| 61 static fromObject(serializedTextRange) { | 69 static fromObject(serializedTextRange) { |
| 62 return new WebInspector.TextRange( | 70 return new WebInspector.TextRange( |
| 63 serializedTextRange.startLine, serializedTextRange.startColumn, serializ
edTextRange.endLine, | 71 serializedTextRange.startLine, serializedTextRange.startColumn, serializ
edTextRange.endLine, |
| 64 serializedTextRange.endColumn); | 72 serializedTextRange.endColumn); |
| 65 } | 73 } |
| 66 | 74 |
| 67 /** | 75 /** |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 return WebInspector.TextRange.comparator(edit1.oldRange, edit2.oldRange); | 324 return WebInspector.TextRange.comparator(edit1.oldRange, edit2.oldRange); |
| 317 } | 325 } |
| 318 | 326 |
| 319 /** | 327 /** |
| 320 * @return {!WebInspector.TextRange} | 328 * @return {!WebInspector.TextRange} |
| 321 */ | 329 */ |
| 322 newRange() { | 330 newRange() { |
| 323 return WebInspector.TextRange.fromEdit(this.oldRange, this.newText); | 331 return WebInspector.TextRange.fromEdit(this.oldRange, this.newText); |
| 324 } | 332 } |
| 325 }; | 333 }; |
| OLD | NEW |