Web Inspector: content views are not restored on reload if its tree element is filter...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 01:09:18 +0000 (01:09 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 May 2017 01:09:18 +0000 (01:09 +0000)
commitacb184d0d13044785324bde727fdbec1edf693e6
treed2c3ba5a74c9399a228f8992139e300cf134f287
parente4a1688292d53a762fecac235f9ad67179343ba3
Web Inspector: content views are not restored on reload if its tree element is filtered out
https://bugs.webkit.org/show_bug.cgi?id=165744
<rdar://problem/27461323>

Reviewed by Devin Rousso.

By default, NavigationSidebar should get the selected represented object
from its content browser, instead of relying on the tree selection. This
allows a filtered tree selection to persist across page loads.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.get currentRepresentedObject):
(WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
Get the represented object from the content browser instead of relying
on the tree selection (which can be filtered out).

(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._treeElementWasFiltered):
Reselect the represented object's tree element when it is shown due
to a change in the filter state.

(WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement): Deleted.
Not used.
(WebInspector.NavigationSidebarPanel.prototype.representedObjectWasFiltered): Deleted.
Not used. Replaced by _treeElementWasFiltered.

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