| 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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 this._removeAllNodeHighlights(); | 954 this._removeAllNodeHighlights(); |
| 955 | 955 |
| 956 var oldBoundary = this.calculator().boundary(); | 956 var oldBoundary = this.calculator().boundary(); |
| 957 this._timeCalculator.updateBoundariesForEventTime(this._mainRequestLoadT
ime); | 957 this._timeCalculator.updateBoundariesForEventTime(this._mainRequestLoadT
ime); |
| 958 this._durationCalculator.updateBoundariesForEventTime(this._mainRequestL
oadTime); | 958 this._durationCalculator.updateBoundariesForEventTime(this._mainRequestL
oadTime); |
| 959 this._timeCalculator.updateBoundariesForEventTime(this._mainRequestDOMCo
ntentLoadedTime); | 959 this._timeCalculator.updateBoundariesForEventTime(this._mainRequestDOMCo
ntentLoadedTime); |
| 960 this._durationCalculator.updateBoundariesForEventTime(this._mainRequestD
OMContentLoadedTime); | 960 this._durationCalculator.updateBoundariesForEventTime(this._mainRequestD
OMContentLoadedTime); |
| 961 | 961 |
| 962 var dataGrid = this._dataGrid; | 962 var dataGrid = this._dataGrid; |
| 963 var rootNode = dataGrid.rootNode(); | 963 var rootNode = dataGrid.rootNode(); |
| 964 /** @type {!Array<!WebInspector.NetworkDataGridNode> } */ |
| 964 var nodesToInsert = []; | 965 var nodesToInsert = []; |
| 966 /** @type {!Array<!WebInspector.NetworkDataGridNode> } */ |
| 967 var nodesToRefresh = []; |
| 965 for (var requestId in this._staleRequestIds) { | 968 for (var requestId in this._staleRequestIds) { |
| 966 var node = this._nodesByRequestId.get(requestId); | 969 var node = this._nodesByRequestId.get(requestId); |
| 967 if (!node) | 970 if (!node) |
| 968 continue; | 971 continue; |
| 969 var isFilteredOut = !this._applyFilter(node); | 972 var isFilteredOut = !this._applyFilter(node); |
| 970 if (node[WebInspector.NetworkLogView._isFilteredOutSymbol] !== isFil
teredOut) { | 973 if (node[WebInspector.NetworkLogView._isFilteredOutSymbol] !== isFil
teredOut) { |
| 971 if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol]) | 974 if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol]) |
| 972 rootNode.removeChild(node); | 975 rootNode.removeChild(node); |
| 973 | 976 |
| 974 node[WebInspector.NetworkLogView._isFilteredOutSymbol] = isFilte
redOut; | 977 node[WebInspector.NetworkLogView._isFilteredOutSymbol] = isFilte
redOut; |
| 975 | 978 |
| 976 if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol]) | 979 if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol]) |
| 977 nodesToInsert.push(node); | 980 nodesToInsert.push(node); |
| 978 } | 981 } |
| 982 if (!isFilteredOut) |
| 983 nodesToRefresh.push(node); |
| 979 var request = node.request(); | 984 var request = node.request(); |
| 980 this._timeCalculator.updateBoundaries(request); | 985 this._timeCalculator.updateBoundaries(request); |
| 981 this._durationCalculator.updateBoundaries(request); | 986 this._durationCalculator.updateBoundaries(request); |
| 982 } | 987 } |
| 983 | 988 |
| 984 for (var i = 0; i < nodesToInsert.length; ++i) { | 989 for (var i = 0; i < nodesToInsert.length; ++i) { |
| 985 var node = nodesToInsert[i]; | 990 var node = nodesToInsert[i]; |
| 986 var request = node.request(); | 991 var request = node.request(); |
| 987 dataGrid.insertChild(node); | 992 dataGrid.insertChild(node); |
| 988 node.refresh(); | |
| 989 node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = thi
s._matchRequest(request); | 993 node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = thi
s._matchRequest(request); |
| 990 } | 994 } |
| 991 | 995 |
| 996 for (var node of nodesToRefresh) |
| 997 node.refresh(); |
| 998 |
| 992 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM
atchIndex(this._currentMatchedRequestNode), false); | 999 this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindM
atchIndex(this._currentMatchedRequestNode), false); |
| 993 | 1000 |
| 994 if (!this.calculator().boundary().equals(oldBoundary)) { | 1001 if (!this.calculator().boundary().equals(oldBoundary)) { |
| 995 // The boundaries changed, so all item graphs are stale. | 1002 // The boundaries changed, so all item graphs are stale. |
| 996 this._updateDividersIfNeeded(); | 1003 this._updateDividersIfNeeded(); |
| 997 var nodes = this._nodesByRequestId.valuesArray(); | 1004 var nodes = this._nodesByRequestId.valuesArray(); |
| 998 for (var i = 0; i < nodes.length; ++i) | 1005 for (var i = 0; i < nodes.length; ++i) |
| 999 nodes[i].refreshGraph(); | 1006 nodes[i].refreshGraph(); |
| 1000 } | 1007 } |
| 1001 | 1008 |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 return false; | 2173 return false; |
| 2167 return true; | 2174 return true; |
| 2168 } | 2175 } |
| 2169 | 2176 |
| 2170 WebInspector.NetworkLogView.EventTypes = { | 2177 WebInspector.NetworkLogView.EventTypes = { |
| 2171 RequestSelected: "RequestSelected", | 2178 RequestSelected: "RequestSelected", |
| 2172 SearchCountUpdated: "SearchCountUpdated", | 2179 SearchCountUpdated: "SearchCountUpdated", |
| 2173 SearchIndexUpdated: "SearchIndexUpdated", | 2180 SearchIndexUpdated: "SearchIndexUpdated", |
| 2174 UpdateRequest: "UpdateRequest" | 2181 UpdateRequest: "UpdateRequest" |
| 2175 }; | 2182 }; |
| OLD | NEW |