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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js

Issue 2686713003: DevTools: Disable timeline network pane resizer when network group is collapsed. (Closed)
Patch Set: make it work for real 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Timeline.FlameChartStyle = { 5 Timeline.FlameChartStyle = {
6 textColor: '#333' 6 textColor: '#333'
7 }; 7 };
8 8
9 /** 9 /**
10 * @enum {symbol} 10 * @enum {symbol}
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 this._mainView.alwaysShowVerticalScroll(); 124 this._mainView.alwaysShowVerticalScroll();
125 this._mainView.enableRuler(false); 125 this._mainView.enableRuler(false);
126 126
127 var networkViewGroupExpansionSetting = 127 var networkViewGroupExpansionSetting =
128 Common.settings.createSetting('timelineFlamechartNetworkViewGroupExpansi on', {}); 128 Common.settings.createSetting('timelineFlamechartNetworkViewGroupExpansi on', {});
129 this._networkDataProvider = new Timeline.TimelineFlameChartNetworkDataProvid er(this._model); 129 this._networkDataProvider = new Timeline.TimelineFlameChartNetworkDataProvid er(this._model);
130 this._networkView = new PerfUI.FlameChart(this._networkDataProvider, this, n etworkViewGroupExpansionSetting); 130 this._networkView = new PerfUI.FlameChart(this._networkDataProvider, this, n etworkViewGroupExpansionSetting);
131 this._networkView.alwaysShowVerticalScroll(); 131 this._networkView.alwaysShowVerticalScroll();
132 networkViewGroupExpansionSetting.addChangeListener(this.resizeToPreferredHei ghts.bind(this)); 132 networkViewGroupExpansionSetting.addChangeListener(this.resizeToPreferredHei ghts.bind(this));
133 133
134 const networkPane = new UI.VBox(); 134 this._networkPane = new UI.VBox();
135 networkPane.setMinimumSize(23, 23); 135 this._networkPane.setMinimumSize(23, 23);
136 this._networkView.show(networkPane.element); 136 this._networkView.show(this._networkPane.element);
137 this._splitResizer = networkPane.element.createChild('div', 'timeline-flamec hart-resizer'); 137 this._splitResizer = this._networkPane.element.createChild('div', 'timeline- flamechart-resizer');
138 this._splitWidget.hideDefaultResizer(); 138 this._splitWidget.hideDefaultResizer(true);
139 this._splitWidget.installResizer(this._splitResizer); 139 this._splitWidget.installResizer(this._splitResizer);
140 140
141 this._splitWidget.setMainWidget(this._mainView); 141 this._splitWidget.setMainWidget(this._mainView);
142 this._splitWidget.setSidebarWidget(networkPane); 142 this._splitWidget.setSidebarWidget(this._networkPane);
143 143
144 if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) { 144 if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
145 // Create top level properties splitter. 145 // Create top level properties splitter.
146 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState'); 146 this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelD etailsSplitViewState');
147 this._detailsSplitWidget.element.classList.add('timeline-details-split'); 147 this._detailsSplitWidget.element.classList.add('timeline-details-split');
148 this._detailsView = 148 this._detailsView =
149 new Timeline.TimelineDetailsView(timelineModel, frameModel, filmStripM odel, filters, delegate); 149 new Timeline.TimelineDetailsView(timelineModel, frameModel, filmStripM odel, filters, delegate);
150 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ; 150 this._detailsSplitWidget.installResizer(this._detailsView.headerElement()) ;
151 this._detailsSplitWidget.setMainWidget(this._splitWidget); 151 this._detailsSplitWidget.setMainWidget(this._splitWidget);
152 this._detailsSplitWidget.setSidebarWidget(this._detailsView); 152 this._detailsSplitWidget.setSidebarWidget(this._detailsView);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 /** 314 /**
315 * @param {!PerfUI.FlameChartDataProvider} dataProvider 315 * @param {!PerfUI.FlameChartDataProvider} dataProvider
316 * @param {!Common.Event} event 316 * @param {!Common.Event} event
317 */ 317 */
318 _onEntrySelected(dataProvider, event) { 318 _onEntrySelected(dataProvider, event) {
319 var entryIndex = /** @type{number} */ (event.data); 319 var entryIndex = /** @type{number} */ (event.data);
320 this._delegate.select(dataProvider.createSelection(entryIndex)); 320 this._delegate.select(dataProvider.createSelection(entryIndex));
321 } 321 }
322 322
323 resizeToPreferredHeights() { 323 resizeToPreferredHeights() {
324 this._networkPane.element.classList.toggle(
325 'timeline-network-resizer-disabled', !this._networkDataProvider.isExpand ed());
324 this._splitWidget.setSidebarSize( 326 this._splitWidget.setSidebarSize(
325 this._networkDataProvider.preferredHeight() + this._splitResizer.clientH eight + PerfUI.FlameChart.HeaderHeight + 327 this._networkDataProvider.preferredHeight() + this._splitResizer.clientH eight + PerfUI.FlameChart.HeaderHeight +
326 3); 328 2);
327 } 329 }
328 }; 330 };
329 331
330 /** 332 /**
331 * @unrestricted 333 * @unrestricted
332 */ 334 */
333 Timeline.TimelineFlameChartView.Selection = class { 335 Timeline.TimelineFlameChartView.Selection = class {
334 /** 336 /**
335 * @param {!Timeline.TimelineSelection} selection 337 * @param {!Timeline.TimelineSelection} selection
336 * @param {number} entryIndex 338 * @param {number} entryIndex
337 */ 339 */
338 constructor(selection, entryIndex) { 340 constructor(selection, entryIndex) {
339 this.timelineSelection = selection; 341 this.timelineSelection = selection;
340 this.entryIndex = entryIndex; 342 this.entryIndex = entryIndex;
341 } 343 }
342 }; 344 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698