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

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

Issue 2690603003: Timeline: streamline flame chart views update logic (Closed)
Patch Set: moar fixes Created 3 years, 10 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/TimelineNetworkFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
index 9250b3fc26b17177409abd9735aec13f442c1e94..d066c156a6561e53b67bd5dd90fd8dcaf28f252f 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
@@ -9,9 +9,7 @@
Timeline.TimelineFlameChartNetworkDataProvider = class {
constructor() {
this._font = '11px ' + Host.fontFamily();
- /** @type {?TimelineModel.TimelineModel} */
- this._model = null;
- this.reset();
+ this.setModel(null);
this._style = {
padding: 4,
height: 17,
@@ -32,6 +30,10 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
*/
setModel(performanceModel) {
this._model = performanceModel && performanceModel.timelineModel();
+ this._maxLevel = 0;
+ this._timelineData = null;
+ /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */
+ this._requests = [];
}
/**
@@ -81,13 +83,6 @@ Timeline.TimelineFlameChartNetworkDataProvider = class {
return this._timeSpan;
}
- reset() {
- this._maxLevel = 0;
- this._timelineData = null;
- /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */
- this._requests = [];
- }
-
/**
* @param {number} startTime
* @param {number} endTime

Powered by Google App Engine
This is Rietveld 408576698