OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo
cation(rawLocation); | 462 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo
cation(rawLocation); |
463 return uiLocation.linkText(); | 463 return uiLocation.linkText(); |
464 } | 464 } |
465 | 465 |
466 /** | 466 /** |
467 * @return {?string} | 467 * @return {?string} |
468 */ | 468 */ |
469 function linkifyTopCallFrameAsText() | 469 function linkifyTopCallFrameAsText() |
470 { | 470 { |
471 var frame = WebInspector.TimelineUIUtils.topStackFrame(event); | 471 var frame = WebInspector.TimelineUIUtils.topStackFrame(event); |
472 return frame ? linkifyLocationAsText(frame.scriptId, frame.lineNumber, f
rame.columnNumber) : null; | 472 var text = frame ? linkifyLocationAsText(frame.scriptId, frame.lineNumbe
r, frame.columnNumber) : null; |
| 473 if (frame && !text) { |
| 474 text = frame.url; |
| 475 if (typeof frame.lineNumber === "number") |
| 476 text += ":" + (frame.lineNumber + 1); |
| 477 } |
| 478 return text; |
473 } | 479 } |
474 } | 480 } |
475 | 481 |
476 /** | 482 /** |
477 * @param {!WebInspector.TracingModel.Event} event | 483 * @param {!WebInspector.TracingModel.Event} event |
478 * @param {?WebInspector.Target} target | 484 * @param {?WebInspector.Target} target |
479 * @param {!WebInspector.Linkifier} linkifier | 485 * @param {!WebInspector.Linkifier} linkifier |
480 * @return {?Node} | 486 * @return {?Node} |
481 */ | 487 */ |
482 WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
get, linkifier) | 488 WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
get, linkifier) |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2127 var time = /** @type {number} */ (decoration.data()); | 2133 var time = /** @type {number} */ (decoration.data()); |
2128 var text = WebInspector.UIString("%.1f\xa0ms", time); | 2134 var text = WebInspector.UIString("%.1f\xa0ms", time); |
2129 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02,
1); | 2135 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02,
1); |
2130 var element = createElementWithClass("div", "text-editor-line-marker
-performance"); | 2136 var element = createElementWithClass("div", "text-editor-line-marker
-performance"); |
2131 element.textContent = text; | 2137 element.textContent = text; |
2132 element.style.backgroundColor = `rgba(255, 0, 0, ${intensity.toFixed
(3)})`; | 2138 element.style.backgroundColor = `rgba(255, 0, 0, ${intensity.toFixed
(3)})`; |
2133 textEditor.setGutterDecoration(decoration.line(), decoration.type(),
element); | 2139 textEditor.setGutterDecoration(decoration.line(), decoration.type(),
element); |
2134 } | 2140 } |
2135 } | 2141 } |
2136 } | 2142 } |
OLD | NEW |