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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.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/TimelinePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index 57e5e60294a6ff92b0a490afc86c08bf27940aa1..acdbcf24290b98bf3c6f6ec33378790d03560328 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -615,6 +615,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
this._performanceModel.dispose();
this._performanceModel = model;
this._currentViews.forEach(view => view.setModel(this._performanceModel));
+
this._overviewPane.reset();
if (model) {
this._overviewPane.setBounds(
@@ -622,6 +623,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
}
for (var control of this._overviewControls)
control.setModel(model);
+
if (model) {
var cpuProfiles = model.timelineModel().cpuProfiles();
cpuProfiles.forEach(profile => PerfUI.LineLevelProfile.instance().appendCPUProfile(profile));
@@ -632,8 +634,13 @@ Timeline.TimelinePanel = class extends UI.Panel {
this.requestWindowTimes(0, Infinity);
}
this._overviewPane.scheduleUpdate();
+ if (this._detailsView)
+ this._detailsView.setModel(model);
+
this.select(null);
this._updateSearchHighlight(false, true);
+ if (this._flameChart)
+ this._flameChart.resizeToPreferredHeights();
}
/**
@@ -769,8 +776,6 @@ Timeline.TimelinePanel = class extends UI.Panel {
this._backingStorage = backingStorage;
this._setModel(performanceModel);
- if (this._flameChart)
- this._flameChart.resizeToPreferredHeights();
if (this._detailsSplitWidget)
this._detailsSplitWidget.showBoth();
}

Powered by Google App Engine
This is Rietveld 408576698