Web Inspector: Annotators should not be enabled if the TextEditor is not visible
https://bugs.webkit.org/show_bug.cgi?id=169059
Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-03-01
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addResource):
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Only call `showDefaultContentViewForTreeElement` if the panel has been added to a sidebar.
It is not valid to simply check whether the panel is visible, as the sidebar can be collapsed.
In that case, we still want to display the content view, so we instead check that the panel
has been added to a sidebar, meaning that it is ready to be displayed in the current tab.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213251
268f45cc-cd09-0410-ab3c-
d52691b4dbfc