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

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

Issue 2411533002: [Devtools] Added data to networking timeline canvas experiment (Closed)
Patch Set: changes Created 4 years, 2 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/NetworkTimelineColumn.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 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 this._createTable(); 286 this._createTable();
287 this._splitWidget.setSidebarWidget(this._dataGrid.asWidget()); 287 this._splitWidget.setSidebarWidget(this._dataGrid.asWidget());
288 288
289 this._summaryBarElement = this.element.createChild("div", "network-s ummary-bar"); 289 this._summaryBarElement = this.element.createChild("div", "network-s ummary-bar");
290 290
291 this._timelineWidget = new WebInspector.VBox(); 291 this._timelineWidget = new WebInspector.VBox();
292 this._createTimelineHeader(); 292 this._createTimelineHeader();
293 this._timelineWidget.element.classList.add("network-timeline-view"); 293 this._timelineWidget.element.classList.add("network-timeline-view");
294 this._splitWidget.setMainWidget(this._timelineWidget); 294 this._splitWidget.setMainWidget(this._timelineWidget);
295 295
296 var networkTimelineView = new WebInspector.NetworkTimelineColumn(thi s, this._dataGrid); 296 this._timelineColumn = new WebInspector.NetworkTimelineColumn(this, this._dataGrid);
297 networkTimelineView.show(this._timelineWidget.element); 297 this._timelineColumn.show(this._timelineWidget.element);
298 this.switchViewMode(false); 298 this.switchViewMode(false);
299 } else { 299 } else {
300 this._createTable(); 300 this._createTable();
301 this._dataGrid.asWidget().show(this.element); 301 this._dataGrid.asWidget().show(this.element);
302 this._summaryBarElement = this.element.createChild("div", "network-s ummary-bar"); 302 this._summaryBarElement = this.element.createChild("div", "network-s ummary-bar");
303 } 303 }
304 304
305 this._columns.sortByCurrentColumn(); 305 this._columns.sortByCurrentColumn();
306 this._updateRowsSize(); 306 this._updateRowsSize();
307 }, 307 },
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 if (!this.calculator().boundary().equals(oldBoundary)) { 664 if (!this.calculator().boundary().equals(oldBoundary)) {
665 // The boundaries changed, so all item graphs are stale. 665 // The boundaries changed, so all item graphs are stale.
666 this._columns.updateDividersIfNeeded(); 666 this._columns.updateDividersIfNeeded();
667 var nodes = this._nodesByRequestId.valuesArray(); 667 var nodes = this._nodesByRequestId.valuesArray();
668 for (var i = 0; i < nodes.length; ++i) 668 for (var i = 0; i < nodes.length; ++i)
669 nodes[i].refreshGraph(); 669 nodes[i].refreshGraph();
670 } 670 }
671 671
672 this._staleRequestIds = {}; 672 this._staleRequestIds = {};
673 this._updateSummaryBar(); 673 this._updateSummaryBar();
674 if (Runtime.experiments.isEnabled("canvasNetworkTimeline"))
675 this._timelineColumn.scheduleRefreshData();
674 }, 676 },
675 677
676 reset: function() 678 reset: function()
677 { 679 {
678 this._requestWithHighlightedInitiators = null; 680 this._requestWithHighlightedInitiators = null;
679 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null); 681 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null);
680 682
681 this._clearSearchMatchedList(); 683 this._clearSearchMatchedList();
682 684
683 this._columns.reset(); 685 this._columns.reset();
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 }, 1120 },
1119 1121
1120 dataGridSorted: function() 1122 dataGridSorted: function()
1121 { 1123 {
1122 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM atchIndex(this._currentMatchedRequestNode), false); 1124 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM atchIndex(this._currentMatchedRequestNode), false);
1123 1125
1124 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline")) 1126 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline"))
1125 return; 1127 return;
1126 1128
1127 this._timelineColumnSortIcon.classList.remove("sort-ascending", "sort-de scending"); 1129 this._timelineColumnSortIcon.classList.remove("sort-ascending", "sort-de scending");
1128 if (this._dataGrid.sortColumnIdentifier() !== "timeline")
1129 return;
1130 1130
1131 if (this._dataGrid.sortOrder() === WebInspector.DataGrid.Order.Ascending ) 1131 if (this._dataGrid.sortColumnIdentifier() === "timeline") {
1132 this._timelineColumnSortIcon.classList.add("sort-ascending"); 1132 if (this._dataGrid.sortOrder() === WebInspector.DataGrid.Order.Ascen ding)
1133 else 1133 this._timelineColumnSortIcon.classList.add("sort-ascending");
1134 this._timelineColumnSortIcon.classList.add("sort-descending"); 1134 else
1135 this._timelineColumnSortIcon.classList.add("sort-descending");
1136 }
1137
1138 this._timelineColumn.scheduleRefreshData();
1135 }, 1139 },
1136 1140
1137 /** 1141 /**
1138 * @param {number} n 1142 * @param {number} n
1139 * @param {boolean} reveal 1143 * @param {boolean} reveal
1140 */ 1144 */
1141 _highlightNthMatchedRequestForSearch: function(n, reveal) 1145 _highlightNthMatchedRequestForSearch: function(n, reveal)
1142 { 1146 {
1143 this._removeAllHighlights(); 1147 this._removeAllHighlights();
1144 1148
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 * @return {boolean} 1817 * @return {boolean}
1814 */ 1818 */
1815 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) 1819 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request)
1816 { 1820 {
1817 if (request.issueTime() > windowEnd) 1821 if (request.issueTime() > windowEnd)
1818 return false; 1822 return false;
1819 if (request.endTime !== -1 && request.endTime < windowStart) 1823 if (request.endTime !== -1 && request.endTime < windowStart)
1820 return false; 1824 return false;
1821 return true; 1825 return true;
1822 } 1826 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698