diff options
author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
tree | db769fadd053248f85db67434a5b275224defef7 /Source/WebCore/inspector/front-end/NetworkPanel.js | |
parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/inspector/front-end/NetworkPanel.js')
-rw-r--r-- | Source/WebCore/inspector/front-end/NetworkPanel.js | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/Source/WebCore/inspector/front-end/NetworkPanel.js b/Source/WebCore/inspector/front-end/NetworkPanel.js index 28cbd36..943ee7f 100644 --- a/Source/WebCore/inspector/front-end/NetworkPanel.js +++ b/Source/WebCore/inspector/front-end/NetworkPanel.js @@ -78,6 +78,11 @@ WebInspector.NetworkPanel = function() this._filter(this._filterAllElement, false); this._toggleGridMode(); + + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceStarted, this._onResourceStarted, this); + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceUpdated, this._onResourceUpdated, this); + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceFinished, this._onResourceUpdated, this); + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.MainResourceCommitLoad, this._onMainResourceCommitLoad, this); } WebInspector.NetworkPanel.prototype = { @@ -772,7 +777,12 @@ WebInspector.NetworkPanel.prototype = { return this._resourcesById[id]; }, - appendResource: function(resource) + _onResourceStarted: function(event) + { + this._appendResource(event.data); + }, + + _appendResource: function(resource) { this._resources.push(resource); this._resourcesById[resource.identifier] = resource; @@ -781,13 +791,18 @@ WebInspector.NetworkPanel.prototype = { // Pull all the redirects of the main resource upon commit load. if (resource.redirects) { for (var i = 0; i < resource.redirects.length; ++i) - this.refreshResource(resource.redirects[i]); + this._refreshResource(resource.redirects[i]); } - this.refreshResource(resource); + this._refreshResource(resource); + }, + + _onResourceUpdated: function(event) + { + this._refreshResource(event.data); }, - refreshResource: function(resource) + _refreshResource: function(resource) { this._staleResources.push(resource); this._scheduleRefresh(); @@ -811,7 +826,7 @@ WebInspector.NetworkPanel.prototype = { this._reset(); }, - mainResourceChanged: function() + _onMainResourceCommitLoad: function() { if (this._preserveLogToggle.toggled) return; @@ -819,7 +834,7 @@ WebInspector.NetworkPanel.prototype = { this._reset(); // Now resurrect the main resource along with all redirects that lead to it. var resourcesToAppend = (WebInspector.mainResource.redirects || []).concat(WebInspector.mainResource); - resourcesToAppend.forEach(this.appendResource, this); + resourcesToAppend.forEach(this._appendResource, this); }, canShowSourceLine: function(url, line) |