Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2016 18:42:21 +0000 (18:42 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2016 18:42:21 +0000 (18:42 +0000)
commitab8751e78b4b143ca8d3986895aa7c7989924cbd
tree0d8b6b6559d32e5de06cd0cee875b9c124f8d280
parent0e273cc4d8adbfd72cccee5ecbd1a91e2a094253
Assertion Failed: StyleDetailsPanel.markAsNeedsRefresh() called with null domNode
https://bugs.webkit.org/show_bug.cgi?id=157955
<rdar://problem/26398943>

Reviewed by Timothy Hatcher.

CSSStyleDetailsSidebarPanel `visible` is true while the panel is being
removed from the details sidebar, even after calling `hidden()`. This
causes it to refresh its current StyleDetailsPanel with a null DOM node.

Unfortunately, SidebarPanel.visible isn't toggled by calling shown/hidden.
Since SidebarPanel.visible is only true if the panel is selected, we should
deselect panels before removing them.

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.removeSidebarPanel):
Deselect the panel being removed before calling visibiltyDidChange.

* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.toggle): Deleted.
(WebInspector.SidebarPanel.prototype.willRemove): Deleted.
Drive-by update to remove some unused methods.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Sidebar.js
Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js