Web Inspector: Initiated section of Resource Details Sidebar should not display as...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2016 21:33:59 +0000 (21:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jan 2016 21:33:59 +0000 (21:33 +0000)
commita973e1383d17e2f31232a8200646108fcc453fe9
tree40725f85b06ee16937e82d0c4eb808254c678362
parent56feaa85d246280394782cd257ede34ffff7d23c
Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes
https://bugs.webkit.org/show_bug.cgi?id=152907
<rdar://problem/24109927>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-01-08
Reviewed by Timothy Hatcher.

* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.addInitiatedResource):
Dispatch an event when the list of initiated resources changes.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
Add/remove event listeners for initiated resources changes to refresh
the related resources section.

(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
Show/hide the related resources section depending on if we have something or not.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js