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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 1804043002: Revert of Remove V8RecrusionScope, cleanup call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 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
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 var text = frame ? linkifyLocationAsText(frame.scriptId, frame.lineNumbe r, frame.columnNumber) : null; 472 return frame ? linkifyLocationAsText(frame.scriptId, frame.lineNumber, f rame.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;
479 } 473 }
480 } 474 }
481 475
482 /** 476 /**
483 * @param {!WebInspector.TracingModel.Event} event 477 * @param {!WebInspector.TracingModel.Event} event
484 * @param {?WebInspector.Target} target 478 * @param {?WebInspector.Target} target
485 * @param {!WebInspector.Linkifier} linkifier 479 * @param {!WebInspector.Linkifier} linkifier
486 * @return {?Node} 480 * @return {?Node}
487 */ 481 */
488 WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar get, linkifier) 482 WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar get, linkifier)
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 var time = /** @type {number} */ (decoration.data()); 2127 var time = /** @type {number} */ (decoration.data());
2134 var text = WebInspector.UIString("%.1f\xa0ms", time); 2128 var text = WebInspector.UIString("%.1f\xa0ms", time);
2135 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1); 2129 var intensity = Number.constrain(Math.log10(1 + 2 * time) / 5, 0.02, 1);
2136 var element = createElementWithClass("div", "text-editor-line-marker -performance"); 2130 var element = createElementWithClass("div", "text-editor-line-marker -performance");
2137 element.textContent = text; 2131 element.textContent = text;
2138 element.style.backgroundColor = `rgba(255, 0, 0, ${intensity.toFixed (3)})`; 2132 element.style.backgroundColor = `rgba(255, 0, 0, ${intensity.toFixed (3)})`;
2139 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element); 2133 textEditor.setGutterDecoration(decoration.line(), decoration.type(), element);
2140 } 2134 }
2141 } 2135 }
2142 } 2136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698