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

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

Issue 1315373005: DevTools: remove most convenience wrappers from WI.TimelineModel.Record (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TimelineUIUtils.js b/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 4cb991baf2b3ae1725de221316b93ff1d10bda02..30607392daa8f7e453573856ace9bb140a56c14d 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -1134,13 +1134,12 @@ WebInspector.TimelineUIUtils.InvalidationsGroupElement.prototype = {
/**
* @param {!Object} total
+ * @param {!WebInspector.TimelineModel} model
* @param {!WebInspector.TimelineModel.Record} record
*/
-WebInspector.TimelineUIUtils.aggregateTimeForRecord = function(total, record)
+WebInspector.TimelineUIUtils.aggregateTimeForRecord = function(total, model, record)
{
- var traceEvent = record.traceEvent();
- var model = record.timelineModel();
- WebInspector.TimelineUIUtils._aggregatedStatsForTraceEvent(total, model, traceEvent);
+ WebInspector.TimelineUIUtils._aggregatedStatsForTraceEvent(total, model, record.traceEvent());
}
/**
@@ -1243,7 +1242,7 @@ WebInspector.TimelineUIUtils.buildPicturePreviewContent = function(event, target
}
/**
- * @param {string} recordType
+ * @param {!WebInspector.TimelineModel.RecordType} recordType
* @param {?string} title
* @param {number} position
* @return {!Element}
@@ -1273,12 +1272,13 @@ WebInspector.TimelineUIUtils.createEventDivider = function(recordType, title, po
/**
* @param {!WebInspector.TimelineModel.Record} record
+ * @param {number} zeroTime
* @param {number} position
* @return {!Element}
*/
-WebInspector.TimelineUIUtils.createDividerForRecord = function(record, position)
+WebInspector.TimelineUIUtils.createDividerForRecord = function(record, zeroTime, position)
{
- var startTime = Number.millisToString(record.startTime() - record.timelineModel().minimumRecordTime());
+ var startTime = Number.millisToString(record.startTime() - zeroTime);
var title = WebInspector.UIString("%s at %s", WebInspector.TimelineUIUtils.eventTitle(record.traceEvent()), startTime);
return WebInspector.TimelineUIUtils.createEventDivider(record.type(), title, position);
}

Powered by Google App Engine
This is Rietveld 408576698