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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/common/TextRange.js

Issue 2500493003: [DevTools] make breakpoints better (Closed)
Patch Set: Created 4 years, 1 month 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 /* 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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698