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

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

Issue 1748993002: DevTools: Initial implementation of line-level CPU profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline 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 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 case warnings.V8Deopt: 2094 case warnings.V8Deopt:
2095 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53", 2095 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53",
2096 WebInspector.UIString("Not optimized"), undefined, true)); 2096 WebInspector.UIString("Not optimized"), undefined, true));
2097 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"])); 2097 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"]));
2098 break; 2098 break;
2099 default: 2099 default:
2100 console.assert(false, "Unhandled TimelineModel.WarningType"); 2100 console.assert(false, "Unhandled TimelineModel.WarningType");
2101 } 2101 }
2102 return span; 2102 return span;
2103 } 2103 }
2104
2105 WebInspector.TimelineUIUtils.PerformanceLineMarkerDecorator = function()
pfeldman 2016/03/07 19:57:50 Should implement something.
alph 2016/03/08 00:57:43 Done.
2106 {
2107 }
2108
2109 WebInspector.TimelineUIUtils.PerformanceLineMarkerDecorator.prototype = {
2110 /**
2111 * @param {?} data
2112 * @return {!Element}
2113 */
2114 decorate: function(data)
2115 {
2116 var info = /** @type {!{text: string, intensity: number}} */ (data);
2117 var element = createElementWithClass("div", "text-editor-performance-inf o");
2118 element.textContent = info.text;
2119 element.style.backgroundColor = `rgba(255, 0, 0, ${info.intensity.toFixe d(3)})`;
2120 return element;
2121 }
2122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698