Title: [246025] trunk/Source/WebInspectorUI
Revision
246025
Author
[email protected]
Date
2019-06-02 16:34:36 -0700 (Sun, 02 Jun 2019)

Log Message

Web Inspector: propagate whether to show prototype information to subobject views
https://bugs.webkit.org/show_bug.cgi?id=194929

Reviewed by Matt Baker.

Add a way to mark the `ObjectTreeView` as holding a JSON value, which extends
`showOnlyProperties` to also hide the prototype of all held values (e.g. children).

* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.showOnlyJSON): Added.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property .prototype-property): Added.

* UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView.prototype.layout):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
* UserInterface/Views/JSONResourceContentView.css:
(.content-view.resource.json .object-tree .prototype-property): Deleted.
* UserInterface/Views/JSONResourceContentView.js:
(WI.JSONResourceContentView.prototype.contentAvailable):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (246024 => 246025)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-06-02 23:34:36 UTC (rev 246025)
@@ -1,3 +1,27 @@
+2019-06-02  Devin Rousso  <[email protected]>
+
+        Web Inspector: propagate whether to show prototype information to subobject views
+        https://bugs.webkit.org/show_bug.cgi?id=194929
+
+        Reviewed by Matt Baker.
+
+        Add a way to mark the `ObjectTreeView` as holding a JSON value, which extends
+        `showOnlyProperties` to also hide the prototype of all held values (e.g. children).
+
+        * UserInterface/Views/ObjectTreeView.js:
+        (WI.ObjectTreeView.prototype.showOnlyJSON): Added.
+        * UserInterface/Views/ObjectTreeView.css:
+        (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Added.
+
+        * UserInterface/Views/AuditTestCaseContentView.js:
+        (WI.AuditTestCaseContentView.prototype.layout):
+        * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+        (WI.DOMNodeDetailsSidebarPanel.prototype._refreshAssociatedData):
+        * UserInterface/Views/JSONResourceContentView.css:
+        (.content-view.resource.json .object-tree .prototype-property): Deleted.
+        * UserInterface/Views/JSONResourceContentView.js:
+        (WI.JSONResourceContentView.prototype.contentAvailable):
+
 2019-05-31  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: CSS Changes: modifications aren't shared for rules that match multiple elements

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestCaseContentView.js	2019-06-02 23:34:36 UTC (rev 246025)
@@ -161,7 +161,7 @@
 
                     let objectTree = element.__objectTree;
                     if (objectTree) {
-                        objectTree.showOnlyProperties();
+                        objectTree.showOnlyJSON();
                         objectTree.expand();
                     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js	2019-06-02 23:34:36 UTC (rev 246025)
@@ -521,7 +521,7 @@
 
                 let objectTree = element.__objectTree;
                 if (objectTree) {
-                    objectTree.showOnlyProperties();
+                    objectTree.showOnlyJSON();
                     objectTree.expand();
                 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css	2019-06-02 23:34:36 UTC (rev 246025)
@@ -27,7 +27,3 @@
     padding: 10px;
     overflow: scroll;
 }
-
-.content-view.resource.json .object-tree .prototype-property {
-    display: none;
-}

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js	2019-06-02 23:34:36 UTC (rev 246025)
@@ -69,6 +69,7 @@
             this._remoteObject = WI.RemoteObject.fromPayload(result, this.resource.target);
 
             let objectTree = new WI.ObjectTreeView(this._remoteObject);
+            objectTree.showOnlyJSON();
             objectTree.expand();
 
             this.element.appendChild(objectTree.element);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css	2019-06-02 23:34:36 UTC (rev 246025)
@@ -107,6 +107,10 @@
     opacity: 1;
 }
 
+.object-tree.properties-only.json-only .object-tree-property .prototype-property {
+    display: none;
+}
+
 .tree-outline.object li {
     white-space: nowrap;
     text-overflow: ellipsis;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (246024 => 246025)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2019-06-02 22:18:06 UTC (rev 246024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js	2019-06-02 23:34:36 UTC (rev 246025)
@@ -222,6 +222,13 @@
         this._includeProtoProperty = false;
     }
 
+    showOnlyJSON()
+    {
+        this.showOnlyProperties();
+
+        this._element.classList.add("json-only");
+    }
+
     appendTitleSuffix(suffixElement)
     {
         if (this._previewView)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to