Web Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Nov 2017 23:39:54 +0000 (23:39 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Nov 2017 23:39:54 +0000 (23:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179717
<rdar://problem/35551541>

Reviewed by Devin Rousso.

NavigationSidebarPanels should not be created with WI.instanceForClass.

* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
* UserInterface/Views/StorageSidebarPanel.js:
(WI.StorageSidebarPanel):
* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.get navigationSidebarPanel):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/TabContentView.js

index 2b5fee5..51ed6b5 100644 (file)
@@ -1,3 +1,23 @@
+2017-11-15  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: REGRESSION (r217750): Navigation sidebar broken after closing and re-opening tab
+        https://bugs.webkit.org/show_bug.cgi?id=179717
+        <rdar://problem/35551541>
+
+        Reviewed by Devin Rousso.
+
+        NavigationSidebarPanels should not be created with WI.instanceForClass.
+
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WI.ResourceSidebarPanel):
+        * UserInterface/Views/SearchSidebarPanel.js:
+        (WI.SearchSidebarPanel):
+        * UserInterface/Views/StorageSidebarPanel.js:
+        (WI.StorageSidebarPanel):
+        * UserInterface/Views/TabContentView.js:
+        (WI.TabContentView.prototype.get navigationSidebarPanel):
+
 2017-11-15  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Remove GTK web inspector images
index c78c33e..6a2c8f0 100644 (file)
 
 WI.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WI.NavigationSidebarPanel
 {
-    constructor(contentBrowser)
+    constructor()
     {
         super("debugger", WI.UIString("Debugger"), true);
 
-        this.contentBrowser = contentBrowser;
-
         WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
         WI.Frame.addEventListener(WI.Frame.Event.ResourceWasAdded, this._resourceAdded, this);
         WI.Target.addEventListener(WI.Target.Event.ResourceAdded, this._resourceAdded, this);
index d59e229..a423b37 100644 (file)
 
 WI.ResourceSidebarPanel = class ResourceSidebarPanel extends WI.NavigationSidebarPanel
 {
-    constructor(contentBrowser)
+    constructor()
     {
         super("resource", WI.UIString("Resources"), true);
 
-        this.contentBrowser = contentBrowser;
-
         this._navigationBar = new WI.NavigationBar;
         this.addSubview(this._navigationBar);
 
index 0635916..6ba6574 100644 (file)
 
 WI.SearchSidebarPanel = class SearchSidebarPanel extends WI.NavigationSidebarPanel
 {
-    constructor(contentBrowser)
+    constructor()
     {
         super("search", WI.UIString("Search"), true, true);
 
-        this.contentBrowser = contentBrowser;
-
         var searchElement = document.createElement("div");
         searchElement.classList.add("search-bar");
         this.element.appendChild(searchElement);
index c4c0ed9..f93dc3e 100644 (file)
 
 WI.StorageSidebarPanel = class StorageSidebarPanel extends WI.NavigationSidebarPanel
 {
-    constructor(contentBrowser)
+    constructor()
     {
         super("storage", WI.UIString("Storage"));
 
-        this.contentBrowser = contentBrowser;
-
         this._navigationBar = new WI.NavigationBar;
         this.addSubview(this._navigationBar);
 
index 66d78f6..0b24ef3 100644 (file)
@@ -178,7 +178,8 @@ WI.TabContentView = class TabContentView extends WI.ContentView
         if (!this._navigationSidebarPanelConstructor)
             return null;
         if (!this._navigationSidebarPanel)
-            this._navigationSidebarPanel = WI.instanceForClass(this._navigationSidebarPanelConstructor);
+            this._navigationSidebarPanel = new this._navigationSidebarPanelConstructor;
+
         return this._navigationSidebarPanel;
     }