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

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

Issue 2872853002: DevTools: Support grouping by Product in performance tree views. (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
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
index 76cd993abfc0d4544e20bc0f2d61d652dcb8a76d..d61a3a3419ed2bfb43defe02bab94af20d41296e 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
@@ -125,12 +125,11 @@ Timeline.TimelineFlameChartView = class extends UI.VBox {
return Timeline.TimelineUIUtils.eventStyle(event).category.color;
var color = this._urlToColorCache.get(frame.url);
if (!color) {
- var defaultColor = '#f2ecdc';
if (!this._productRegistry)
- return defaultColor;
+ return Timeline.TimelineUIUtils.colorForId('');
var parsedURL = frame.url.asParsedURL();
- var name = parsedURL && this._productRegistry.nameForUrl(parsedURL);
- color = name ? Timeline.TimelineUIUtils.colorForId(name) : defaultColor;
+ var name = parsedURL && this._productRegistry.nameForUrl(parsedURL) || '';
+ color = Timeline.TimelineUIUtils.colorForId(name);
this._urlToColorCache.set(frame.url, color);
}
return color;

Powered by Google App Engine
This is Rietveld 408576698