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

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

Issue 2314173003: Timeline: make prepareHighlightedEntryInfo return ?Promise<!Element> (Closed)
Patch Set: Timeline: make prepareHighlightEntryInfo return ?Element Created 4 years, 3 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
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 0f098e5f28efcf14486f87a22829b9c27725cded..bc189fcc9c29c44d7da9430fd9c187758a957a42 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -139,7 +139,7 @@ WebInspector.TimelineFlameChartDataProviderBase.prototype = {
/**
* @override
* @param {number} entryIndex
- * @return {?Array.<!{title: string, value: (string|!Element)}>}
+ * @return {?Element}
*/
prepareHighlightedEntryInfo: function(entryIndex)
{
@@ -635,7 +635,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
/**
* @override
* @param {number} entryIndex
- * @return {?Array.<!{title: string, value: (string|!Element)}>}
+ * @return {?Element}
*/
prepareHighlightedEntryInfo: function(entryIndex)
{
@@ -666,8 +666,8 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
} else {
return null;
}
- var value = createElement("div");
- var root = WebInspector.createShadowRootWithCoreStyles(value, "timeline/timelineFlamechartPopover.css");
+ var element = createElement("div");
+ var root = WebInspector.createShadowRootWithCoreStyles(element, "timeline/timelineFlamechartPopover.css");
var contents = root.createChild("div", "timeline-flamechart-popover");
contents.createChild("span", "timeline-info-time").textContent = time;
contents.createChild("span", "timeline-info-title").textContent = title;
@@ -675,7 +675,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
warning.classList.add("timeline-info-warning");
contents.appendChild(warning);
}
- return [{ title: "", value: value }];
+ return element;
},
/**
@@ -1136,7 +1136,7 @@ WebInspector.TimelineFlameChartNetworkDataProvider.prototype = {
/**
* @override
* @param {number} index
- * @return {?Array<!{title: string, value: (string|!Element)}>}
+ * @return {?Element}
*/
prepareHighlightedEntryInfo: function(index)
{
@@ -1144,8 +1144,8 @@ WebInspector.TimelineFlameChartNetworkDataProvider.prototype = {
var request = /** @type {!WebInspector.TimelineModel.NetworkRequest} */ (this._requests[index]);
if (!request.url)
return null;
- var value = createElement("div");
- var root = WebInspector.createShadowRootWithCoreStyles(value, "timeline/timelineFlamechartPopover.css");
+ var element = createElement("div");
+ var root = WebInspector.createShadowRootWithCoreStyles(element, "timeline/timelineFlamechartPopover.css");
var contents = root.createChild("div", "timeline-flamechart-popover");
var duration = request.endTime - request.startTime;
if (request.startTime && isFinite(duration))
@@ -1156,7 +1156,7 @@ WebInspector.TimelineFlameChartNetworkDataProvider.prototype = {
div.style.color = this._colorForPriority(request.priority) || "black";
}
contents.createChild("span").textContent = request.url.trimMiddle(maxURLChars);
- return [{ title: "", value: value }];
+ return element;
},
/**

Powered by Google App Engine
This is Rietveld 408576698