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

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

Issue 2080633002: DevTools: render markers as circles on the main timeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined tests Created 4 years, 6 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 e3671badf0a6fe1682217e033be3a42a1026c9d0..f7154e4d5b11623345cafcc006cbabc6a3095275 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -639,7 +639,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
*/
prepareHighlightedEntryInfo: function(entryIndex)
{
- var time;
+ var time = "";
var title;
var warning;
var type = this._entryType(entryIndex);
@@ -648,9 +648,11 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
var totalTime = event.duration;
var selfTime = event.selfTime;
var /** @const */ eps = 1e-6;
- time = typeof totalTime === "number" && Math.abs(totalTime - selfTime) > eps && selfTime > eps ?
- WebInspector.UIString("%s (self %s)", Number.millisToString(totalTime, true), Number.millisToString(selfTime, true)) :
- Number.millisToString(totalTime, true);
+ if (typeof totalTime === "number") {
+ time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?
+ WebInspector.UIString("%s (self %s)", Number.millisToString(totalTime, true), Number.millisToString(selfTime, true)) :
+ Number.millisToString(totalTime, true);
+ }
title = this.entryTitle(entryIndex);
warning = WebInspector.TimelineUIUtils.eventWarning(event);
} else if (type === WebInspector.TimelineFlameChartEntryType.Frame) {
@@ -826,7 +828,12 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
var index = this._entryData.length;
this._entryData.push(event);
this._timelineData.entryLevels[index] = level;
- this._timelineData.entryTotalTimes[index] = event.duration || WebInspector.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs;
+ var duration;
+ if (WebInspector.TimelineModel.isMarkerEvent(event))
+ duration = undefined;
+ else
+ duration = event.duration || WebInspector.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs;
+ this._timelineData.entryTotalTimes[index] = duration;
this._timelineData.entryStartTimes[index] = event.startTime;
},

Powered by Google App Engine
This is Rietveld 408576698