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

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

Issue 2010943002: DevTools: Add grouping by Activity to Timeline treeview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix double DOM GC. group by eventStyle.title, not event.title 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js » ('j') | 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/TimelineProfileTree.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineProfileTree.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineProfileTree.js
index 6eeb31caca44b9afb9b1a4cd27fde8fd3adc8a9f..edc7deb51443c774ce4cfab5eabbdb12095fba61 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineProfileTree.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineProfileTree.js
@@ -218,11 +218,11 @@ WebInspector.TimelineProfileTree.eventStackFrame = function(event)
/**
* @constructor
- * @param {function(!WebInspector.TracingModel.Event):string} categoryMapper
+ * @param {{title: string, category: !WebInspector.TimelineCategory}} eventStyleMapper
caseq 2016/05/26 23:53:42 wrong annotation, this is supposed to be a functio
*/
-WebInspector.TimelineAggregator = function(categoryMapper)
+WebInspector.TimelineAggregator = function(eventStyleMapper)
{
- this._categoryMapper = categoryMapper;
+ this._eventStyleMapper = eventStyleMapper;
/** @type {!Map<string, !WebInspector.TimelineProfileTree.Node>} */
this._groupNodes = new Map();
}
@@ -232,6 +232,7 @@ WebInspector.TimelineAggregator = function(categoryMapper)
*/
WebInspector.TimelineAggregator.GroupBy = {
None: "None",
+ EventName: "EventName",
Category: "Category",
Domain: "Domain",
Subdomain: "Subdomain",
@@ -336,7 +337,8 @@ WebInspector.TimelineAggregator.prototype = {
switch (groupBy) {
case WebInspector.TimelineAggregator.GroupBy.None: return null;
- case WebInspector.TimelineAggregator.GroupBy.Category: return node => node.event ? this._categoryMapper(node.event) : "";
+ case WebInspector.TimelineAggregator.GroupBy.EventName: return node => node.event ? this._eventStyleMapper(node.event).title : "";
+ case WebInspector.TimelineAggregator.GroupBy.Category: return node => node.event ? this._eventStyleMapper(node.event).category.name : "";
case WebInspector.TimelineAggregator.GroupBy.Subdomain: return groupByDomain.bind(null, false);
case WebInspector.TimelineAggregator.GroupBy.Domain: return groupByDomain.bind(null, true);
case WebInspector.TimelineAggregator.GroupBy.URL: return groupByURL;
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698