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

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

Issue 2491823003: Timeline: add experiment to show events from subframes in the frames of their own (Closed)
Patch Set: rebased, adjusted name logic Created 4 years, 1 month 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/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 fc6b986635f0fa62aa5e5ab4ddf5c81ae8ddd7fc..7a233a49bf3b0144fb2638ca33d17e4a71ab2db7 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -1738,6 +1738,17 @@ WebInspector.TimelineUIUtils = class {
}
return span;
}
+
+ /**
+ * @param {!WebInspector.TimelineModel.PageFrame} frame
+ * @param {number=} trimAt
+ */
+ static displayNameForFrame(frame, trimAt) {
+ var url = frame.url;
+ if (!trimAt)
+ trimAt = 30;
+ return url.startsWith('about:') ? `"${frame.name.trimMiddle(trimAt)}"` : frame.url.trimEnd(trimAt);
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698