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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js

Issue 2887923002: DevTools: fix network grid scroll to bottom, render group node frame icon. (Closed)
Patch Set: dropped the datagrid check Created 3 years, 7 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
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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Network.NetworkLogViewColumns = class { 7 Network.NetworkLogViewColumns = class {
8 /** 8 /**
9 * @param {!Network.NetworkLogView} networkLogView 9 * @param {!Network.NetworkLogView} networkLogView
10 * @param {!Network.NetworkTransferTimeCalculator} timeCalculator 10 * @param {!Network.NetworkTransferTimeCalculator} timeCalculator
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 this._dataGrid.markColumnAsSortedBy( 111 this._dataGrid.markColumnAsSortedBy(
112 Network.NetworkLogViewColumns._initialSortColumn, DataGrid.DataGrid.Orde r.Ascending); 112 Network.NetworkLogViewColumns._initialSortColumn, DataGrid.DataGrid.Orde r.Ascending);
113 113
114 this._splitWidget = new UI.SplitWidget(true, true, 'networkPanelSplitViewWat erfall', 200); 114 this._splitWidget = new UI.SplitWidget(true, true, 'networkPanelSplitViewWat erfall', 200);
115 var widget = this._dataGrid.asWidget(); 115 var widget = this._dataGrid.asWidget();
116 widget.setMinimumSize(150, 0); 116 widget.setMinimumSize(150, 0);
117 this._splitWidget.setMainWidget(widget); 117 this._splitWidget.setMainWidget(widget);
118 } 118 }
119 119
120 _setupWaterfall() { 120 _setupWaterfall() {
121 this._waterfallColumn = 121 this._waterfallColumn = new Network.NetworkWaterfallColumn(this._networkLogV iew.calculator());
122 new Network.NetworkWaterfallColumn(this._networkLogView.rowHeight(), thi s._networkLogView.calculator());
123 122
124 this._waterfallColumn.element.addEventListener('contextmenu', handleContextM enu.bind(this)); 123 this._waterfallColumn.element.addEventListener('contextmenu', handleContextM enu.bind(this));
125 this._waterfallColumn.element.addEventListener('mousewheel', this._onMouseWh eel.bind(this, false), {passive: true}); 124 this._waterfallColumn.element.addEventListener('mousewheel', this._onMouseWh eel.bind(this, false), {passive: true});
126 this._dataGridScroller.addEventListener('mousewheel', this._onMouseWheel.bin d(this, true), true); 125 this._dataGridScroller.addEventListener('mousewheel', this._onMouseWheel.bin d(this, true), true);
127 126
128 this._waterfallScroller = this._waterfallColumn.contentElement.createChild(' div', 'network-waterfall-v-scroll'); 127 this._waterfallScroller = this._waterfallColumn.contentElement.createChild(' div', 'network-waterfall-v-scroll');
129 this._waterfallScrollerContent = this._waterfallScroller.createChild('div', 'network-waterfall-v-scroll-content'); 128 this._waterfallScrollerContent = this._waterfallScroller.createChild('div', 'network-waterfall-v-scroll-content');
130 129
131 this._dataGrid.addEventListener(DataGrid.DataGrid.Events.PaddingChanged, () => { 130 this._dataGrid.addEventListener(DataGrid.DataGrid.Events.PaddingChanged, () => {
132 this._waterfallScrollerWidthIsStale = true; 131 this._waterfallScrollerWidthIsStale = true;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 setCalculator(x) { 227 setCalculator(x) {
229 this._waterfallColumn.setCalculator(x); 228 this._waterfallColumn.setCalculator(x);
230 } 229 }
231 230
232 scheduleRefresh() { 231 scheduleRefresh() {
233 this._waterfallColumn.scheduleDraw(); 232 this._waterfallColumn.scheduleDraw();
234 } 233 }
235 234
236 _updateRowsSize() { 235 _updateRowsSize() {
237 var largeRows = !!this._networkLogLargeRowsSetting.get(); 236 var largeRows = !!this._networkLogLargeRowsSetting.get();
237
238 this._dataGrid.element.classList.toggle('small', !largeRows); 238 this._dataGrid.element.classList.toggle('small', !largeRows);
239 this._dataGrid.scheduleUpdate(); 239 this._dataGrid.scheduleUpdate();
240 240
241 this._waterfallScrollerWidthIsStale = true; 241 this._waterfallScrollerWidthIsStale = true;
242 this._waterfallColumn.setRowHeight(this._networkLogView.rowHeight()); 242 this._waterfallColumn.setRowHeight(largeRows ? 41 : 21);
243 this._waterfallScroller.classList.toggle('small', !largeRows); 243 this._waterfallScroller.classList.toggle('small', !largeRows);
244 this._waterfallHeaderElement.classList.toggle('small', !largeRows); 244 this._waterfallHeaderElement.classList.toggle('small', !largeRows);
245 this._waterfallColumn.setHeaderHeight(this._waterfallScroller.offsetTop); 245 this._waterfallColumn.setHeaderHeight(this._waterfallScroller.offsetTop);
246 } 246 }
247 247
248 /** 248 /**
249 * @param {!Element} element 249 * @param {!Element} element
250 */ 250 */
251 show(element) { 251 show(element) {
252 this._splitWidget.show(element); 252 this._splitWidget.show(element);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 /** 803 /**
804 * @enum {string} 804 * @enum {string}
805 */ 805 */
806 Network.NetworkLogViewColumns.WaterfallSortIds = { 806 Network.NetworkLogViewColumns.WaterfallSortIds = {
807 StartTime: 'startTime', 807 StartTime: 'startTime',
808 ResponseTime: 'responseReceivedTime', 808 ResponseTime: 'responseReceivedTime',
809 EndTime: 'endTime', 809 EndTime: 'endTime',
810 Duration: 'duration', 810 Duration: 'duration',
811 Latency: 'latency' 811 Latency: 'latency'
812 }; 812 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698