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

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

Issue 1293273002: DevTools: Use better event titles on timeline tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelineTreeView.js
diff --git a/Source/devtools/front_end/timeline/TimelineTreeView.js b/Source/devtools/front_end/timeline/TimelineTreeView.js
index 543cc7bbce5969166b146c4a2f6247dd17afbab0..7f383cb637555c1717b53aeac542ca8bc225bb67 100644
--- a/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -354,12 +354,22 @@ WebInspector.TimelineTreeView.GridNode.prototype = {
*/
_createNameCell: function(columnIdentifier)
{
+ /**
+ * @param {!WebInspector.TracingModel.Event} e
+ * @return {string}
+ */
+ function eventName(e)
caseq 2015/08/17 22:05:36 inline?
alph 2015/08/18 21:03:22 Done.
+ {
+ if (e.name === WebInspector.TimelineModel.RecordType.JSFrame)
+ return WebInspector.beautifyFunctionName(e.args.data.functionName);
+ return WebInspector.TimelineUIUtils.eventTitle(e);
+ }
var cell = this.createTD(columnIdentifier);
var container = cell.createChild("div", "name-container");
var icon = container.createChild("div", "activity-icon");
var name = container.createChild("div", "activity-name");
var link = container.createChild("div", "activity-link");
- name.textContent = this._profileNode.name;
+ name.textContent = this._profileNode.name || eventName(this._profileNode.event);
var color;
var event = this._profileNode.event;
if (event) {
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698