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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js

Issue 2169153002: DevTools: make all timeline trace events use 0-based line numbers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update expectation Created 4 years, 5 months 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 * @param {!RuntimeAgent.CallFrame} callFrame 217 * @param {!RuntimeAgent.CallFrame} callFrame
218 * @param {string=} classes 218 * @param {string=} classes
219 * @return {?Element} 219 * @return {?Element}
220 */ 220 */
221 maybeLinkifyConsoleCallFrame: function(target, callFrame, classes) 221 maybeLinkifyConsoleCallFrame: function(target, callFrame, classes)
222 { 222 {
223 return this.maybeLinkifyScriptLocation(target, callFrame.scriptId, callF rame.url, callFrame.lineNumber, callFrame.columnNumber, classes); 223 return this.maybeLinkifyScriptLocation(target, callFrame.scriptId, callF rame.url, callFrame.lineNumber, callFrame.columnNumber, classes);
224 }, 224 },
225 225
226 /** 226 /**
227 * @param {?WebInspector.Target} target
228 * @param {!RuntimeAgent.CallFrame} callFrame
229 * @param {string=} classes
230 * @return {?Element}
231 */
232 maybeLinkifyConsoleCallFrameForTracing: function(target, callFrame, classes)
233 {
234 // TODO(kozyatinskiy): remove this when tracing will migrate to 0-based lineNumber and columnNumber.
235 return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame. url, callFrame.lineNumber - 1, callFrame.columnNumber - 1, classes);
236 },
237
238 /**
239 * @param {!WebInspector.Target} target 227 * @param {!WebInspector.Target} target
240 * @param {!RuntimeAgent.StackTrace} stackTrace 228 * @param {!RuntimeAgent.StackTrace} stackTrace
241 * @param {string=} classes 229 * @param {string=} classes
242 * @return {!Element} 230 * @return {!Element}
243 */ 231 */
244 linkifyStackTraceTopFrame: function(target, stackTrace, classes) 232 linkifyStackTraceTopFrame: function(target, stackTrace, classes)
245 { 233 {
246 console.assert(stackTrace.callFrames && stackTrace.callFrames.length); 234 console.assert(stackTrace.callFrames && stackTrace.callFrames.length);
247 235
248 var topFrame = stackTrace.callFrames[0]; 236 var topFrame = stackTrace.callFrames[0];
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 /** 555 /**
568 * @param {!WebInspector.NetworkRequest} request 556 * @param {!WebInspector.NetworkRequest} request
569 * @return {!Element} 557 * @return {!Element}
570 */ 558 */
571 WebInspector.linkifyRequestAsNode = function(request) 559 WebInspector.linkifyRequestAsNode = function(request)
572 { 560 {
573 var anchor = WebInspector.linkifyURLAsNode(request.url); 561 var anchor = WebInspector.linkifyURLAsNode(request.url);
574 anchor.requestId = request.requestId; 562 anchor.requestId = request.requestId;
575 return anchor; 563 return anchor;
576 } 564 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698