Web Inspector: TabBar redesign: only show allowed tabs in the available tabs context...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2018 20:17:30 +0000 (20:17 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2018 20:17:30 +0000 (20:17 +0000)
commit473103db8331fb4d18e6a9671be52a290b97c160
tree50ed9eb7f2dcb9025a001aacbbd82bc7c43501db
parenta4ddcd7ae5ef987692c3e6a5a4f276ee680e8a8e
Web Inspector: TabBar redesign: only show allowed tabs in the available tabs context menu
https://bugs.webkit.org/show_bug.cgi?id=182721
<rdar://problem/37479019>

Reviewed by Timothy Hatcher.

In addition to only including allowed tabs in the TabBar context menu,
perform a sanity check when setting the selected tab item, since the
serialized selection index could refer to a tab that is no longer allowed.

* UserInterface/Views/LegacyTabBar.js:
(WI.LegacyTabBar.prototype.set selectedTabBarItem):
(WI.LegacyTabBar.prototype._handleContextMenu):

* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.set selectedTabBarItem):
(WI.TabBar.prototype._handleContextMenu):

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