Web Inspector: be more specific as to what types of WI.Collection are allowed for...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 17:17:21 +0000 (17:17 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 17:17:21 +0000 (17:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190304

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WI.tabContentViewClassForRepresentedObject):
* UserInterface/Views/ResourcesTabContentView.js:
(WI.ResourcesTabContentView.prototype.canShowRepresentedObject):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js

index 5d526c9..9c768d9 100644 (file)
@@ -1,5 +1,17 @@
 2018-10-08  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: be more specific as to what types of WI.Collection are allowed for the Resources tab
+        https://bugs.webkit.org/show_bug.cgi?id=190304
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Main.js:
+        (WI.tabContentViewClassForRepresentedObject):
+        * UserInterface/Views/ResourcesTabContentView.js:
+        (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
+
+2018-10-08  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Open Resource Dialog should show path to resource (to disambiguate resources with same name)
         https://bugs.webkit.org/show_bug.cgi?id=178153
         <rdar://problem/34925686>
index 7e9148e..5e9c55b 100644 (file)
@@ -1099,10 +1099,13 @@ WI.tabContentViewClassForRepresentedObject = function(representedObject)
     }
 
     if (representedObject instanceof WI.Frame
+        || representedObject instanceof WI.FrameCollection
         || representedObject instanceof WI.Resource
+        || representedObject instanceof WI.ResourceCollection
         || representedObject instanceof WI.Script
+        || representedObject instanceof WI.ScriptCollection
         || representedObject instanceof WI.CSSStyleSheet
-        || (representedObject instanceof WI.Collection && !(representedObject instanceof WI.CanvasCollection)))
+        || representedObject instanceof WI.CSSStyleSheetCollection)
         return WI.ResourcesTabContentView;
 
     if (representedObject instanceof WI.DOMStorageObject || representedObject instanceof WI.CookieStorageObject ||
index 4858ffd..2088b51 100644 (file)
@@ -55,10 +55,13 @@ WI.ResourcesTabContentView = class ResourcesTabContentView extends WI.ContentBro
     canShowRepresentedObject(representedObject)
     {
         return representedObject instanceof WI.Frame
+            || representedObject instanceof WI.FrameCollection
             || representedObject instanceof WI.Resource
+            || representedObject instanceof WI.ResourceCollection
             || representedObject instanceof WI.Script
+            || representedObject instanceof WI.ScriptCollection
             || representedObject instanceof WI.CSSStyleSheet
-            || (representedObject instanceof WI.Collection && !(representedObject instanceof WI.CanvasCollection));
+            || representedObject instanceof WI.CSSStyleSheetCollection;
     }
 };