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

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

Issue 2656163002: DevTools: fix network waterfall sorting icon (Closed)
Patch Set: 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/network/networkLogView.css » ('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 * @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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return this._dataGrid; 258 return this._dataGrid;
259 } 259 }
260 260
261 sortByCurrentColumn() { 261 sortByCurrentColumn() {
262 this._sortHandler(); 262 this._sortHandler();
263 } 263 }
264 264
265 _sortHandler() { 265 _sortHandler() {
266 var columnId = this._dataGrid.sortColumnId(); 266 var columnId = this._dataGrid.sortColumnId();
267 this._networkLogView.removeAllNodeHighlights(); 267 this._networkLogView.removeAllNodeHighlights();
268 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-desce nding');
269
268 if (columnId === 'waterfall') { 270 if (columnId === 'waterfall') {
269 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-des cending');
270
271 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending) 271 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending)
272 this._waterfallColumnSortIcon.classList.add('sort-ascending'); 272 this._waterfallColumnSortIcon.classList.add('sort-ascending');
273 else 273 else
274 this._waterfallColumnSortIcon.classList.add('sort-descending'); 274 this._waterfallColumnSortIcon.classList.add('sort-descending');
275 275
276 this._waterfallRequestsAreStale = true; 276 this._waterfallRequestsAreStale = true;
277 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi nd(null, this._activeWaterfallSortId); 277 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi nd(null, this._activeWaterfallSortId);
278 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin g()); 278 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin g());
279 this._networkLogView.dataGridSorted(); 279 this._networkLogView.dataGridSorted();
280 return; 280 return;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 /** 806 /**
807 * @enum {string} 807 * @enum {string}
808 */ 808 */
809 Network.NetworkLogViewColumns.WaterfallSortIds = { 809 Network.NetworkLogViewColumns.WaterfallSortIds = {
810 StartTime: 'startTime', 810 StartTime: 'startTime',
811 ResponseTime: 'responseReceivedTime', 811 ResponseTime: 'responseReceivedTime',
812 EndTime: 'endTime', 812 EndTime: 'endTime',
813 Duration: 'duration', 813 Duration: 'duration',
814 Latency: 'latency' 814 Latency: 'latency'
815 }; 815 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/networkLogView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698