Title: [224905] trunk/Source/WebInspectorUI
Revision
224905
Author
mattba...@apple.com
Date
2017-11-15 15:39:54 -0800 (Wed, 15 Nov 2017)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (224904 => 224905)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-11-15 23:39:54 UTC (rev 224905)
@@ -1,3 +1,23 @@
+2017-11-15  Matt Baker  <mattba...@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  <mcatanz...@igalia.com>
 
         Remove GTK web inspector images

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (224904 => 224905)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2017-11-15 23:39:54 UTC (rev 224905)
@@ -25,12 +25,10 @@
 
 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);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (224904 => 224905)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2017-11-15 23:39:54 UTC (rev 224905)
@@ -25,12 +25,10 @@
 
 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);
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js (224904 => 224905)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js	2017-11-15 23:39:54 UTC (rev 224905)
@@ -25,12 +25,10 @@
 
 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);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js (224904 => 224905)


--- trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js	2017-11-15 23:39:54 UTC (rev 224905)
@@ -25,12 +25,10 @@
 
 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);
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js (224904 => 224905)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js	2017-11-15 23:25:34 UTC (rev 224904)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js	2017-11-15 23:39:54 UTC (rev 224905)
@@ -178,7 +178,8 @@
         if (!this._navigationSidebarPanelConstructor)
             return null;
         if (!this._navigationSidebarPanel)
-            this._navigationSidebarPanel = WI.instanceForClass(this._navigationSidebarPanelConstructor);
+            this._navigationSidebarPanel = new this._navigationSidebarPanelConstructor;
+
         return this._navigationSidebarPanel;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to