| 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.update(); |
| 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 requests: [], |
| 339 navigationRequest: null |
| 340 }; |
| 341 while (currentNode = currentNode.traverseNextNode(true)) { |
| 342 if (currentNode.isNavigationRequest()) |
| 343 requestData.navigationRequest = currentNode.request(); |
| 344 requestData.requests.push(currentNode.request()); |
| 345 } |
| 346 this._timelineColumn.update(requestData); |
| 337 }, | 347 }, |
| 338 | 348 |
| 339 _showRecordingHint: function() | 349 _showRecordingHint: function() |
| 340 { | 350 { |
| 341 this._hideRecordingHint(); | 351 this._hideRecordingHint(); |
| 342 this._recordingHint = this.element.createChild("div", "network-status-pa
ne fill"); | 352 this._recordingHint = this.element.createChild("div", "network-status-pa
ne fill"); |
| 343 var hintText = this._recordingHint.createChild("div", "recording-hint"); | 353 var hintText = this._recordingHint.createChild("div", "recording-hint"); |
| 344 var reloadShortcutNode = this._recordingHint.createChild("b"); | 354 var reloadShortcutNode = this._recordingHint.createChild("b"); |
| 345 reloadShortcutNode.textContent = WebInspector.shortcutRegistry.shortcutD
escriptorsForAction("main.reload")[0].name; | 355 reloadShortcutNode.textContent = WebInspector.shortcutRegistry.shortcutD
escriptorsForAction("main.reload")[0].name; |
| 346 | 356 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 nodes[i].refreshGraph(); | 734 nodes[i].refreshGraph(); |
| 725 } | 735 } |
| 726 | 736 |
| 727 this._staleRequestIds = {}; | 737 this._staleRequestIds = {}; |
| 728 this._updateSummaryBar(); | 738 this._updateSummaryBar(); |
| 729 | 739 |
| 730 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) | 740 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) |
| 731 this._timelineRequestsAreStale = true; | 741 this._timelineRequestsAreStale = true; |
| 732 }, | 742 }, |
| 733 | 743 |
| 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() | 744 reset: function() |
| 744 { | 745 { |
| 745 this._requestWithHighlightedInitiators = null; | 746 this._requestWithHighlightedInitiators = null; |
| 746 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request
Selected, null); | 747 this.dispatchEventToListeners(WebInspector.NetworkLogView.Events.Request
Selected, null); |
| 747 | 748 |
| 748 this._clearSearchMatchedList(); | 749 this._clearSearchMatchedList(); |
| 749 | 750 |
| 750 this._columns.reset(); | 751 this._columns.reset(); |
| 751 | 752 |
| 752 this._hoveredNode = null; | 753 this._hoveredNode = null; |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 * @return {boolean} | 1895 * @return {boolean} |
| 1895 */ | 1896 */ |
| 1896 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd
, request) | 1897 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd
, request) |
| 1897 { | 1898 { |
| 1898 if (request.issueTime() > windowEnd) | 1899 if (request.issueTime() > windowEnd) |
| 1899 return false; | 1900 return false; |
| 1900 if (request.endTime !== -1 && request.endTime < windowStart) | 1901 if (request.endTime !== -1 && request.endTime < windowStart) |
| 1901 return false; | 1902 return false; |
| 1902 return true; | 1903 return true; |
| 1903 } | 1904 } |
| OLD | NEW |