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

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

Issue 2010943002: DevTools: Add grouping by Activity to Timeline treeview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/TimelineTreeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
index cd96356b88d07c6723f379e23f018f8164f8618a..0dc3a04e7463a30c8904a4f7fef7704e86e4afd4 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -489,6 +489,8 @@ WebInspector.AggregatedTimelineTreeView.prototype = {
_displayInfoForGroupNode: function(node)
{
var categories = WebInspector.TimelineUIUtils.categories();
+ var color = node.id ? WebInspector.TimelineUIUtils.eventColor(node.event) : categories["other"].color;
+
switch (this._groupBySetting.get()) {
case WebInspector.TimelineAggregator.GroupBy.Category:
var category = categories[node.id] || categories["other"];
@@ -503,7 +505,16 @@ WebInspector.AggregatedTimelineTreeView.prototype = {
name = this._executionContextNamesByOrigin.get(name) || name;
return {
name: name || WebInspector.UIString("unattributed"),
- color: node.id ? WebInspector.TimelineUIUtils.eventColor(node.event) : categories["other"].color
+ color: color
+ }
alph 2016/05/26 07:23:20 missing ;
+
+ case WebInspector.TimelineAggregator.GroupBy.EventName:
+ var name = node.event.name === WebInspector.TimelineModel.RecordType.JSFrame ?
+ WebInspector.UIString("Execute Script") : WebInspector.TimelineUIUtils.eventTitle(node.event);
alph 2016/05/26 07:23:21 Strange name. Maybe "JavaScript"?
+ return {
+ name: name,
+ color: node.event.name === WebInspector.TimelineModel.RecordType.JSFrame ?
+ WebInspector.TimelineUIUtils.eventStyle(node.event).category.color : color
}
alph 2016/05/26 07:23:21 missing ;
case WebInspector.TimelineAggregator.GroupBy.URL:
@@ -514,7 +525,7 @@ WebInspector.AggregatedTimelineTreeView.prototype = {
}
return {
name: node.id || WebInspector.UIString("unattributed"),
- color: node.id ? WebInspector.TimelineUIUtils.eventColor(node.event) : categories["other"].color
+ color: color
}
alph 2016/05/26 07:23:21 ditto
},
@@ -539,6 +550,7 @@ WebInspector.AggregatedTimelineTreeView.prototype = {
this._groupByCombobox.select(option);
}
addGroupingOption.call(this, WebInspector.UIString("No Grouping"), WebInspector.TimelineAggregator.GroupBy.None);
+ addGroupingOption.call(this, WebInspector.UIString("Group by Activity"), WebInspector.TimelineAggregator.GroupBy.EventName);
addGroupingOption.call(this, WebInspector.UIString("Group by Category"), WebInspector.TimelineAggregator.GroupBy.Category);
addGroupingOption.call(this, WebInspector.UIString("Group by Domain"), WebInspector.TimelineAggregator.GroupBy.Domain);
addGroupingOption.call(this, WebInspector.UIString("Group by Subdomain"), WebInspector.TimelineAggregator.GroupBy.Subdomain);

Powered by Google App Engine
This is Rietveld 408576698