Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 function requestHovered(event) | 322 function requestHovered(event) |
| 323 { | 323 { |
| 324 var request = /** @type {?WebInspector.NetworkRequest} */ (event.dat a); | 324 var request = /** @type {?WebInspector.NetworkRequest} */ (event.dat a); |
| 325 var node = request ? this._nodesByRequestId.get(request.requestId) : null; | 325 var node = request ? this._nodesByRequestId.get(request.requestId) : null; |
| 326 this._setHoveredNode(node || null); | 326 this._setHoveredNode(node || null); |
| 327 } | 327 } |
| 328 }, | 328 }, |
| 329 | 329 |
| 330 _redrawTimelineColumn: function() | 330 _redrawTimelineColumn: function() |
| 331 { | 331 { |
| 332 /** @type {!Array<!WebInspector.NetworkRequest>|undefined} */ | 332 if (!this._timelineRequestsAreStale) { |
| 333 var requests; | 333 this._timelineColumn.draw(); |
|
dgozman
2016/10/21 20:39:21
There is no |draw| method.
allada
2016/10/21 22:22:26
Done.
| |
| 334 if (this._timelineRequestsAreStale) | 334 return; |
| 335 requests = this._getOrderedRequests(); | 335 } |
| 336 this._timelineColumn.update(requests); | 336 var currentNode = this._dataGrid.rootNode(); |
| 337 var requestData = []; | |
| 338 var navigationRequest = null; | |
|
dgozman
2016/10/21 20:39:21
|update| doesn't accept null as a second argument.
allada
2016/10/21 22:22:26
Done.
| |
| 339 while (currentNode = currentNode.traverseNextNode(true)) { | |
| 340 if (currentNode.isNavigationRequest()) | |
| 341 navigationRequest = currentNode.request(); | |
| 342 requestData.push(currentNode.request()); | |
| 343 } | |
| 344 this._timelineColumn.update(requestData, navigationRequest); | |
| 337 }, | 345 }, |
| 338 | 346 |
| 339 _showRecordingHint: function() | 347 _showRecordingHint: function() |
| 340 { | 348 { |
| 341 this._hideRecordingHint(); | 349 this._hideRecordingHint(); |
| 342 this._recordingHint = this.element.createChild("div", "network-status-pa ne fill"); | 350 this._recordingHint = this.element.createChild("div", "network-status-pa ne fill"); |
| 343 var hintText = this._recordingHint.createChild("div", "recording-hint"); | 351 var hintText = this._recordingHint.createChild("div", "recording-hint"); |
| 344 var reloadShortcutNode = this._recordingHint.createChild("b"); | 352 var reloadShortcutNode = this._recordingHint.createChild("b"); |
| 345 reloadShortcutNode.textContent = WebInspector.shortcutRegistry.shortcutD escriptorsForAction("main.reload")[0].name; | 353 reloadShortcutNode.textContent = WebInspector.shortcutRegistry.shortcutD escriptorsForAction("main.reload")[0].name; |
| 346 | 354 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 724 nodes[i].refreshGraph(); | 732 nodes[i].refreshGraph(); |
| 725 } | 733 } |
| 726 | 734 |
| 727 this._staleRequestIds = {}; | 735 this._staleRequestIds = {}; |
| 728 this._updateSummaryBar(); | 736 this._updateSummaryBar(); |
| 729 | 737 |
| 730 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) | 738 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) |
| 731 this._timelineRequestsAreStale = true; | 739 this._timelineRequestsAreStale = true; |
| 732 }, | 740 }, |
| 733 | 741 |
| 734 _getOrderedRequests: function() | |
| 735 { | |
| 736 var currentNode = this._dataGrid.rootNode(); | |
| 737 var requestData = []; | |
| 738 while (currentNode = currentNode.traverseNextNode(true)) | |
| 739 requestData.push(currentNode.request()); | |
| 740 return requestData; | |
| 741 }, | |
| 742 | |
| 743 reset: function() | 742 reset: function() |
| 744 { | 743 { |
| 745 this._requestWithHighlightedInitiators = null; | 744 this._requestWithHighlightedInitiators = null; |
| 746 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null); | 745 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request Selected, null); |
| 747 | 746 |
| 748 this._clearSearchMatchedList(); | 747 this._clearSearchMatchedList(); |
| 749 | 748 |
| 750 this._columns.reset(); | 749 this._columns.reset(); |
| 751 | 750 |
| 752 this._hoveredNode = null; | 751 this._hoveredNode = null; |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1894 * @return {boolean} | 1893 * @return {boolean} |
| 1895 */ | 1894 */ |
| 1896 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) | 1895 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) |
| 1897 { | 1896 { |
| 1898 if (request.issueTime() > windowEnd) | 1897 if (request.issueTime() > windowEnd) |
| 1899 return false; | 1898 return false; |
| 1900 if (request.endTime !== -1 && request.endTime < windowStart) | 1899 if (request.endTime !== -1 && request.endTime < windowStart) |
| 1901 return false; | 1900 return false; |
| 1902 return true; | 1901 return true; |
| 1903 } | 1902 } |
| OLD | NEW |