Changeset 31918 in webkit
- Timestamp:
- Apr 15, 2008 1:56:43 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31917 r31918 1 2008-04-15 Timothy Hatcher <timothy@apple.com> 2 3 Fixes the bug where a resource view could still be shown after the inspected 4 page navigates to another page. 5 6 https://bugs.webkit.org/show_bug.cgi?id=18517 7 8 Reviewed by Adam Roben. 9 10 * page/inspector/ResourcesPanel.js: 11 (WebInspector.ResourcesPanel.prototype.reset): Close the visible resource. 12 Iterate over all the resources and zero errors and warnings and delete the 13 resource view and tree element. Removes all children of resourceViews. Passes 14 true to _updateGraphDividersIfNeeded to force an immediate update. 15 (WebInspector.ResourcesPanel.prototype.removeResource): Added. Closes 16 the resource view if it is visible. Removes the resource from the _resources 17 array. Removes the tree element from the outline tree. Zeros out the errors 18 and warnings properties. Deletes the tree element and resource view properties. 19 (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Null check 20 this._calculator for times when reset is called before the calculator is set. 21 * page/inspector/inspector.js: 22 (WebInspector.removeResource): Call ResourcesPanel.removeResource. 23 1 24 2008-04-15 Anders Carlsson <andersca@apple.com> 2 25 -
trunk/WebCore/page/inspector/ResourcesPanel.js
r31910 r31918 234 234 reset: function() 235 235 { 236 this.closeVisibleResource(); 237 236 238 if (this._calculator) 237 239 this._calculator.reset(); 238 240 241 if (this._resources) { 242 var resourcesLength = this._resources.length; 243 for (var i = 0; i < resourcesLength; ++i) { 244 var resource = this._resources[i]; 245 246 resource.warnings = 0; 247 resource.errors = 0; 248 249 delete resource._resourcesTreeElement; 250 delete resource._resourcesView; 251 } 252 } 253 239 254 this._resources = []; 240 255 this._staleResources = []; 241 256 242 257 this.resourcesTreeElement.removeChildren(); 243 244 this._updateGraphDividersIfNeeded(); 258 this.resourceViews.removeChildren(); 259 260 this._updateGraphDividersIfNeeded(true); 245 261 246 262 this._drawSummaryGraph(); // draws an empty graph … … 259 275 260 276 this.refreshResource(resource); 277 }, 278 279 removeResource: function(resource) 280 { 281 if (this.visibleResourceView === resource._resourcesView) 282 this.closeVisibleResource(); 283 284 var resourcesLength = this._resources.length; 285 for (var i = 0; i < resourcesLength; ++i) { 286 if (this._resources[i] === resource) { 287 this._resources.splice(i, 1); 288 break; 289 } 290 } 291 292 this.resourcesTreeElement.removeChild(resource._resourcesTreeElement); 293 294 resource.warnings = 0; 295 resource.errors = 0; 296 297 delete resource._resourcesTreeElement; 298 delete resource._resourcesView; 261 299 }, 262 300 … … 380 418 delete this.visibleResource; 381 419 382 this.calculator._graphsTreeElement.select(true); 420 if (this._calculator && this._calculator._graphsTreeElement) 421 this._calculator._graphsTreeElement.select(true); 383 422 384 423 this._updateSidebarWidth(); -
trunk/WebCore/page/inspector/inspector.js
r31889 r31918 617 617 } 618 618 } 619 620 this.panels.resources.removeResource(resource); 619 621 } 620 622
Note: See TracChangeset
for help on using the changeset viewer.