Title: [235242] trunk/Source/WebInspectorUI
Revision
235242
Author
[email protected]
Date
2018-08-23 13:20:15 -0700 (Thu, 23 Aug 2018)

Log Message

Web Inspector: `console.inspect(sessionStorage)` first time does not show Session Storage content view if Storage tab was previously unvisited
https://bugs.webkit.org/show_bug.cgi?id=188801

Reviewed by Matt Baker.

* UserInterface/Base/Main.js:
(WI.tabContentViewClassForRepresentedObject):
(WI._storageWasInspected):
Since the `WI.StorageSidebarPanel` is not created until the `WI.StorageTabContentView` is
created, the `WI.StorageManager.Event.DOMStorageObjectWasInspected` and
`WI.StorageManager.Event.DatabaseWasInspected` events do not reach the sidebar. We should
follow what `WI._domNodeWasInspected` does and additionally call `WI.showRepresentedObject`
on the inspected object.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (235241 => 235242)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-08-23 20:08:03 UTC (rev 235241)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-08-23 20:20:15 UTC (rev 235242)
@@ -1,5 +1,21 @@
 2018-08-23  Devin Rousso  <[email protected]>
 
+        Web Inspector: `console.inspect(sessionStorage)` first time does not show Session Storage content view if Storage tab was previously unvisited
+        https://bugs.webkit.org/show_bug.cgi?id=188801
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Base/Main.js:
+        (WI.tabContentViewClassForRepresentedObject):
+        (WI._storageWasInspected):
+        Since the `WI.StorageSidebarPanel` is not created until the `WI.StorageTabContentView` is
+        created, the `WI.StorageManager.Event.DOMStorageObjectWasInspected` and
+        `WI.StorageManager.Event.DatabaseWasInspected` events do not reach the sidebar. We should
+        follow what `WI._domNodeWasInspected` does and additionally call `WI.showRepresentedObject`
+        on the inspected object.
+
+2018-08-23  Devin Rousso  <[email protected]>
+
         Web Inspector: REGRESSION: InspectorStyleSheet not visible in the resources sidebar
         https://bugs.webkit.org/show_bug.cgi?id=188819
         <rdar://problem/43579039>

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (235241 => 235242)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2018-08-23 20:08:03 UTC (rev 235241)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2018-08-23 20:20:15 UTC (rev 235242)
@@ -1121,12 +1121,11 @@
         || (representedObject instanceof WI.Collection && !(representedObject instanceof WI.CanvasCollection)))
         return WI.ResourcesTabContentView;
 
-    // FIXME: Move these to a Storage tab.
     if (representedObject instanceof WI.DOMStorageObject || representedObject instanceof WI.CookieStorageObject ||
         representedObject instanceof WI.DatabaseTableObject || representedObject instanceof WI.DatabaseObject ||
         representedObject instanceof WI.ApplicationCacheFrame || representedObject instanceof WI.IndexedDatabaseObjectStore ||
-        representedObject instanceof WI.IndexedDatabaseObjectStoreIndex)
-        return WI.ResourcesTabContentView;
+        representedObject instanceof WI.IndexedDatabase || representedObject instanceof WI.IndexedDatabaseObjectStoreIndex)
+        return WI.StorageTabContentView;
 
     if (representedObject instanceof WI.CanvasCollection)
         return WI.CanvasTabContentView;
@@ -1815,6 +1814,7 @@
 WI._storageWasInspected = function(event)
 {
     this.showStorageTab();
+    this.showRepresentedObject(event.data.domStorage, null, {ignoreSearchTab: true});
 };
 
 WI._domNodeWasInspected = function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to