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