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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 7cdc39252c448b7e16b557380db3dcd374154e7e..29b889342186e1f8e12257fb88c37567990e7bf7 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -2101,3 +2101,22 @@ WebInspector.TimelineUIUtils.eventWarning = function(event, warningType)
}
return span;
}
+
+WebInspector.TimelineUIUtils.PerformanceLineMarkerDecorator = function()
pfeldman 2016/03/07 19:57:50 Should implement something.
alph 2016/03/08 00:57:43 Done.
+{
+}
+
+WebInspector.TimelineUIUtils.PerformanceLineMarkerDecorator.prototype = {
+ /**
+ * @param {?} data
+ * @return {!Element}
+ */
+ decorate: function(data)
+ {
+ var info = /** @type {!{text: string, intensity: number}} */ (data);
+ var element = createElementWithClass("div", "text-editor-performance-info");
+ element.textContent = info.text;
+ element.style.backgroundColor = `rgba(255, 0, 0, ${info.intensity.toFixed(3)})`;
+ return element;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698