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

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

Issue 2882343002: DevTools: Make flamechart coloring depend on group by selector. (Closed)
Patch Set: . 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js ('k') | no next file » | 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/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 887887c159b78a8ff0c78aad6b9145efad47fb12..0dbde349affeef34e0de2d2800bb843633d38cca 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -280,6 +280,21 @@ Timeline.TimelineUIUtils = class {
/**
* @param {!SDK.TracingModel.Event} event
+ * @return {?string}
+ */
+ static eventURL(event) {
+ var data = event.args['data'] || event.args['beginData'];
+ var url = data && data.url;
+ if (url)
+ return url;
+ var stackTrace = data && data['stackTrace'];
+ var frame =
+ stackTrace && stackTrace.length && stackTrace[0] || TimelineModel.TimelineData.forEvent(event).topFrame();
+ return frame && frame.url || null;
+ }
+
+ /**
+ * @param {!SDK.TracingModel.Event} event
* @return {!{title: string, category: !Timeline.TimelineCategory}}
*/
static eventStyle(event) {
@@ -1195,8 +1210,8 @@ Timeline.TimelineUIUtils = class {
var initiator = TimelineModel.TimelineData.forEvent(event).initiator();
// Indirect causes.
- if (TimelineModel.InvalidationTracker.invalidationEventsFor(event) &&
- target) { // Full invalidation tracking (experimental).
+ if (TimelineModel.InvalidationTracker.invalidationEventsFor(event) && target) {
+ // Full invalidation tracking (experimental).
contentHelper.addSection(Common.UIString('Invalidations'));
Timeline.TimelineUIUtils._generateInvalidations(event, target, relatedNodesMap, contentHelper);
} else if (initiator) { // Partial invalidation tracking.
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698