Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js |
| index 2bd1c76259bac2184824aa1f1eb9b0782475dcac..3bcf6cbfe66c90bdf6a8145308e3648abc27be9b 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js |
| @@ -24,9 +24,27 @@ WebInspector.NetworkTimelineColumn = function(networkLogView, dataGrid) |
| this._networkLogView = networkLogView; |
| /** @type {!Array<!WebInspector.NetworkRequest>} */ |
| this._requestData = []; |
| + this.scheduleUpdate(); |
|
dgozman
2016/10/11 19:19:41
I don't think we need to schedule until wasShown.
|
| } |
| WebInspector.NetworkTimelineColumn.prototype = { |
| + scheduleRefreshData: function() |
| + { |
| + this._needsRefreshData = true; |
| + }, |
| + |
| + _refreshDataIfNeeded: function() |
| + { |
| + if (!this._needsRefreshData) |
| + return; |
| + this._needsRefreshData = false; |
| + var currentNode = this._dataGrid.rootNode(); |
| + this._requestData = []; |
| + while (currentNode = currentNode.traverseNextNode(true)) |
| + this._requestData.push(currentNode.request()); |
| + this._update(); |
| + }, |
| + |
| scheduleUpdate: function() |
| { |
| if (this._updateRequestID) |
| @@ -39,6 +57,8 @@ WebInspector.NetworkTimelineColumn.prototype = { |
| this.element.window().cancelAnimationFrame(this._updateRequestID); |
| this._updateRequestID = null; |
| + this._refreshDataIfNeeded(); |
| + |
| this._startTime = this._networkLogView.calculator().minimumBoundary(); |
| this._endTime = this._networkLogView.calculator().maximumBoundary(); |
| this._resetCanvas(); |