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

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

Issue 2863293002: DevTools: Support color by Product on timeline flamechart. (Closed)
Patch Set: addressing comments Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6c8f907310a139888f4156dbd3ae8cb56d6bbd73..0914becad84e952096c0cbdd2cd1cc508a37ce62 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -312,7 +312,7 @@ Timeline.TimelineUIUtils = class {
if (event.name === TimelineModel.TimelineModel.RecordType.JSFrame) {
var frame = event.args['data'];
if (Timeline.TimelineUIUtils.isUserFrame(frame))
- return Timeline.TimelineUIUtils.colorForURL(frame.url);
+ return Timeline.TimelineUIUtils.colorForId(frame.url);
}
return Timeline.TimelineUIUtils.eventStyle(event).category.color;
}
@@ -1728,15 +1728,15 @@ Timeline.TimelineUIUtils = class {
}
/**
- * @param {string} url
+ * @param {string} id
* @return {string}
*/
- static colorForURL(url) {
- if (!Timeline.TimelineUIUtils.colorForURL._colorGenerator) {
- Timeline.TimelineUIUtils.colorForURL._colorGenerator =
+ static colorForId(id) {
+ if (!Timeline.TimelineUIUtils.colorForId._colorGenerator) {
+ Timeline.TimelineUIUtils.colorForId._colorGenerator =
new PerfUI.FlameChart.ColorGenerator({min: 30, max: 330}, {min: 50, max: 80, count: 3}, 85);
}
- return Timeline.TimelineUIUtils.colorForURL._colorGenerator.colorForID(url);
+ return Timeline.TimelineUIUtils.colorForId._colorGenerator.colorForID(id);
}
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698