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

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: update the test. 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..8a2ee58158bc75edd453e90457c57060d92d509b 100644
--- a/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -359,19 +359,20 @@ WebInspector.TimelineTreeView.GridNode.prototype = {
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;
- var color;
var event = this._profileNode.event;
if (event) {
+ name.textContent = event.name === WebInspector.TimelineModel.RecordType.JSFrame
+ ? WebInspector.beautifyFunctionName(event.args["data"]["functionName"])
+ : WebInspector.TimelineUIUtils.eventTitle(event);
var url = WebInspector.TimelineTreeView.eventURL(event);
if (url)
link.appendChild(WebInspector.linkifyResourceAsNode(url));
var category = WebInspector.TimelineUIUtils.eventStyle(event).category;
- color = category.fillColorStop1;
+ icon.style.backgroundColor = category.fillColorStop1;
} else {
- color = WebInspector.TimelineUIUtils.colorForURL(this._profileNode.name);
+ name.textContent = this._profileNode.name;
+ icon.style.backgroundColor = WebInspector.TimelineUIUtils.colorForURL(this._profileNode.name);
}
- icon.style.backgroundColor = color || "lightGrey";
return cell;
},
« 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