Web Inspector: Remove dead TabBrowser/TabContentView code
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2018 05:59:28 +0000 (05:59 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2018 05:59:28 +0000 (05:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184104

Reviewed by Devin Rousso.

* UserInterface/Base/Main.js:
(WI._tryToRestorePendingTabs):
* UserInterface/Views/NewTabContentView.js:
(WI.NewTabContentView.prototype.shown):
(WI.NewTabContentView.prototype.hidden):
* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype.addTabForContentView):
(WI.TabBrowser.prototype.showTabForContentView):
(WI.TabBrowser._tabBarItemRemoved):
* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.get parentTabBrowser): Deleted.
(WI.TabContentView.prototype.set parentTabBrowser): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230149 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js
Source/WebInspectorUI/UserInterface/Views/TabBrowser.js
Source/WebInspectorUI/UserInterface/Views/TabContentView.js

index 3d55dfd..d52bebe 100644 (file)
@@ -1,3 +1,23 @@
+2018-04-01  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: Remove dead TabBrowser/TabContentView code
+        https://bugs.webkit.org/show_bug.cgi?id=184104
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Base/Main.js:
+        (WI._tryToRestorePendingTabs):
+        * UserInterface/Views/NewTabContentView.js:
+        (WI.NewTabContentView.prototype.shown):
+        (WI.NewTabContentView.prototype.hidden):
+        * UserInterface/Views/TabBrowser.js:
+        (WI.TabBrowser.prototype.addTabForContentView):
+        (WI.TabBrowser.prototype.showTabForContentView):
+        (WI.TabBrowser._tabBarItemRemoved):
+        * UserInterface/Views/TabContentView.js:
+        (WI.TabContentView.prototype.get parentTabBrowser): Deleted.
+        (WI.TabContentView.prototype.set parentTabBrowser): Deleted.
+
 2018-03-30  Devin Rousso  <webkit@devinrousso.com>
 
         Web Inspector: tint all pixels drawn by shader program when hovering ShaderProgramTreeElement
index 15f430a..5ec21b8 100644 (file)
@@ -614,7 +614,7 @@ WI._tryToRestorePendingTabs = function()
     this._pendingOpenTabs = stillPendingOpenTabs;
 
     if (!WI.settings.experimentalEnableNewTabBar.value)
-        this.tabBrowser.tabBar.updateNewTabTabBarItemState();
+        this.tabBar.updateNewTabTabBarItemState();
 };
 
 WI.showNewTabTab = function(options)
@@ -1416,8 +1416,6 @@ WI._mainResourceDidChange = function(event)
     if (!event.target.isMainFrame())
         return;
 
-    this._inProvisionalLoad = false;
-
     // Run cookie restoration after we are sure all of the Tabs and NavigationSidebarPanels
     // have updated with respect to the main resource change.
     setTimeout(this._restoreCookieForOpenTabs.bind(this, WI.StateRestorationType.Navigation));
@@ -1433,8 +1431,6 @@ WI._provisionalLoadStarted = function(event)
         return;
 
     this._saveCookieForOpenTabs();
-
-    this._inProvisionalLoad = true;
 };
 
 WI._restoreCookieForOpenTabs = function(restorationType)
index 5626649..ec4d375 100644 (file)
@@ -62,15 +62,15 @@ WI.NewTabContentView = class NewTabContentView extends WI.TabContentView
 
     shown()
     {
-        WI.tabBrowser.tabBar.addEventListener(WI.TabBar.Event.TabBarItemAdded, this._updateTabItems, this);
-        WI.tabBrowser.tabBar.addEventListener(WI.TabBar.Event.TabBarItemRemoved, this._updateTabItems, this);
+        WI.tabBar.addEventListener(WI.TabBar.Event.TabBarItemAdded, this._updateTabItems, this);
+        WI.tabBar.addEventListener(WI.TabBar.Event.TabBarItemRemoved, this._updateTabItems, this);
 
         this._updateTabItems();
     }
 
     hidden()
     {
-        WI.tabBrowser.tabBar.removeEventListener(null, null, this);
+        WI.tabBar.removeEventListener(null, null, this);
     }
 
     get supportsSplitContentBrowser()
index a56020c..537b93f 100644 (file)
@@ -157,8 +157,6 @@ WI.TabBrowser = class TabBrowser extends WI.View
         if (tabBarItem.representedObject !== tabContentView)
             tabBarItem.representedObject = tabContentView;
 
-        tabContentView.parentTabBrowser = this;
-
         if (tabBarItem.parentTabBar === this._tabBar)
             return true;
 
@@ -185,8 +183,7 @@ WI.TabBrowser = class TabBrowser extends WI.View
         if (!this.addTabForContentView(tabContentView, options))
             return false;
 
-        if (!options.suppressSelection)
-            this._tabBar.selectedTabBarItem = tabContentView.tabBarItem;
+        this._tabBar.selectedTabBarItem = tabContentView.tabBarItem;
 
         // FIXME: this is a workaround for <https://webkit.org/b/151876>.
         // Without this extra call, we might never lay out the child tab
@@ -292,8 +289,6 @@ WI.TabBrowser = class TabBrowser extends WI.View
 
         this._contentViewContainer.closeContentView(tabContentView);
 
-        tabContentView.parentTabBrowser = null;
-
         console.assert(this._recentTabContentViews.length === this._tabBar.saveableTabCount);
         console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]);
     }
index c8e193e..9377450 100644 (file)
@@ -79,16 +79,6 @@ WI.TabContentView = class TabContentView extends WI.ContentView
         return null;
     }
 
-    get parentTabBrowser()
-    {
-        return this._parentTabBrowser;
-    }
-
-    set parentTabBrowser(tabBrowser)
-    {
-        this._parentTabBrowser = tabBrowser || null;
-    }
-
     get identifier()
     {
         return this._identifier;