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

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

Issue 2847223002: DevTools: update group-by combobox upon tree view change in timeline aggregated details. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
index 37e7ff121ec87cb141a3fbfb1ac9558ae2a4e757..dc07c7f3a2f0e7a8e7e69c53dbb29a1b632a9097 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -631,6 +631,7 @@ Timeline.AggregatedTimelineTreeView = class extends Timeline.TimelineTreeView {
super();
this._groupBySetting =
Common.settings.createSetting('timelineTreeGroupBy', Timeline.AggregatedTimelineTreeView.GroupBy.None);
+ this._groupByCombobox = new UI.ToolbarComboBox(this._onGroupByChanged.bind(this));
this.init(filters);
this._stackView = new Timeline.TimelineStackView(this);
this._stackView.addEventListener(
@@ -639,6 +640,16 @@ Timeline.AggregatedTimelineTreeView = class extends Timeline.TimelineTreeView {
/**
* @override
+ */
+ wasShown() {
+ var groupById = this._groupBySetting.get();
+ var option = this._groupByCombobox.options().find(option => option.value === groupById);
+ if (option)
+ this._groupByCombobox.select(option);
+ }
+
+ /**
+ * @override
* @param {!Timeline.TimelineSelection} selection
*/
updateContents(selection) {
@@ -712,7 +723,6 @@ Timeline.AggregatedTimelineTreeView = class extends Timeline.TimelineTreeView {
*/
populateToolbar(toolbar) {
super.populateToolbar(toolbar);
- this._groupByCombobox = new UI.ToolbarComboBox(this._onGroupByChanged.bind(this));
/**
* @param {string} name
* @param {string} id
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698