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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineUIUtilsImpl.js

Issue 404953004: DevTools: Refactor linkifyRawLocation to use fallback url (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.TimelineUIUtils} 7 * @extends {WebInspector.TimelineUIUtils}
8 */ 8 */
9 WebInspector.TimelineUIUtilsImpl = function() 9 WebInspector.TimelineUIUtilsImpl = function()
10 { 10 {
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 * @param {number} lineNumber 403 * @param {number} lineNumber
404 * @param {number=} columnNumber 404 * @param {number=} columnNumber
405 */ 405 */
406 function linkifyLocation(scriptId, url, lineNumber, columnNumber) 406 function linkifyLocation(scriptId, url, lineNumber, columnNumber)
407 { 407 {
408 if (!url) 408 if (!url)
409 return null; 409 return null;
410 410
411 // FIXME(62725): stack trace line/column numbers are one-based. 411 // FIXME(62725): stack trace line/column numbers are one-based.
412 columnNumber = columnNumber ? columnNumber - 1 : 0; 412 columnNumber = columnNumber ? columnNumber - 1 : 0;
413 return linkifier.linkifyLocationByScriptId(record.target(), scriptId, ur l, lineNumber - 1, columnNumber, "timeline-details"); 413 return linkifier.linkifyScriptLocation(record.target(), scriptId, url, l ineNumber - 1, columnNumber, "timeline-details");
414 } 414 }
415 415
416 /** 416 /**
417 * @param {!ConsoleAgent.CallFrame} callFrame 417 * @param {!ConsoleAgent.CallFrame} callFrame
418 */ 418 */
419 function linkifyCallFrame(callFrame) 419 function linkifyCallFrame(callFrame)
420 { 420 {
421 return linkifyLocation(callFrame.scriptId, callFrame.url, callFrame.line Number, callFrame.columnNumber); 421 return linkifyLocation(callFrame.scriptId, callFrame.url, callFrame.line Number, callFrame.columnNumber);
422 } 422 }
423 423
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 else if (recordType === recordTypes.TimeStamp) 683 else if (recordType === recordTypes.TimeStamp)
684 eventDivider.className += " resources-orange-divider"; 684 eventDivider.className += " resources-orange-divider";
685 else if (recordType === recordTypes.BeginFrame) 685 else if (recordType === recordTypes.BeginFrame)
686 eventDivider.className += " timeline-frame-divider"; 686 eventDivider.className += " timeline-frame-divider";
687 687
688 if (title) 688 if (title)
689 eventDivider.title = title; 689 eventDivider.title = title;
690 690
691 return eventDivider; 691 return eventDivider;
692 } 692 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698