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

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

Issue 1463393003: DevTools: Make item info follow the mouse on the flame chart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments + coloring Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.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/TimelineFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
index 17b82a87303efcb51a26b4c341c36e6b7fdb4f13..de8550c0319cb3dc90bd5b74650d536d80d11013 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -938,6 +938,26 @@ WebInspector.TimelineFlameChartNetworkDataProvider.prototype = {
},
/**
+ * @override
+ * @param {number} index
+ * @return {?Array<!{title: string, value: (string|!Element)}>}
+ */
+ prepareHighlightedEntryInfo: function(index)
+ {
+ var /** @const */ maxURLChars = 80;
+ var request = /** @type {!WebInspector.TimelineModel.NetworkRequest} */ (this._requests[index]);
+ if (!request.url)
+ return null;
+ var value = createElement("div");
+ var duration = request.endTime - request.startTime;
+ if (request.startTime && isFinite(duration))
+ value.createChild("span", "timeline-network-info-duration").textContent = Number.millisToString(duration);
+ value.createChild("span", "timeline-network-info-method").textContent = request.requestMethod;
+ value.createChild("span", "timeline-network-info-url").textContent = request.url.trimMiddle(maxURLChars);
+ return [{ title: "", value: value }];
+ },
+
+ /**
* @param {!Array.<!WebInspector.TracingModel.Event>} events
*/
_appendTimelineData: function(events)
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698