Title: [106808] trunk
Revision
106808
Author
[email protected]
Date
2012-02-06 08:20:23 -0800 (Mon, 06 Feb 2012)

Log Message

Web Inspector: Redesign summary view / retaining tree contents
https://bugs.webkit.org/show_bug.cgi?id=77870

Patch by Alexei Filippov <[email protected]> on 2012-02-06
Reviewed by Pavel Feldman.

1. Make object IDs less contrast.
2. Put array indices in [].
3. Do not write type if it's just "Object".

Source/WebCore:

* inspector/front-end/DetailedHeapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
(WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
(WebInspector.HeapSnapshotObjectNode.prototype._emptyData):
(WebInspector.HeapSnapshotObjectNode.prototype._enhanceData):
(WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):
(WebInspector.HeapSnapshotConstructorNode.prototype.get data):
* inspector/front-end/heapProfiler.css:
(.detailed-heapshot-view .console-formatted-id):
(.detailed-heapshot-view td.object-column span.grayed):

LayoutTests:

* inspector/profiler/detailed-heapshots-test.js:
(initialize_DetailedHeapshotTest.):
(initialize_DetailedHeapshotTest):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106807 => 106808)


--- trunk/LayoutTests/ChangeLog	2012-02-06 16:10:13 UTC (rev 106807)
+++ trunk/LayoutTests/ChangeLog	2012-02-06 16:20:23 UTC (rev 106808)
@@ -1,3 +1,18 @@
+2012-02-06  Alexei Filippov  <[email protected]>
+
+        Web Inspector: Redesign summary view / retaining tree contents
+        https://bugs.webkit.org/show_bug.cgi?id=77870
+
+        Reviewed by Pavel Feldman.
+
+        1. Make object IDs less contrast.
+        2. Put array indices in [].
+        3. Do not write type if it's just "Object".
+
+        * inspector/profiler/detailed-heapshots-test.js:
+        (initialize_DetailedHeapshotTest.):
+        (initialize_DetailedHeapshotTest):
+
 2012-02-03  Hans Wennborg  <[email protected]>
 
         Speech input: fix fast/speech/bubble-position.html

Modified: trunk/LayoutTests/inspector/profiler/detailed-heapshots-test.js (106807 => 106808)


--- trunk/LayoutTests/inspector/profiler/detailed-heapshots-test.js	2012-02-06 16:10:13 UTC (rev 106807)
+++ trunk/LayoutTests/inspector/profiler/detailed-heapshots-test.js	2012-02-06 16:20:23 UTC (rev 106808)
@@ -122,12 +122,9 @@
     function extractId(data)
     {
         data = ""
-        if (!data.value)
-            InspectorTest.addResult("No value field in " + JSON.stringify(data));
-        var indexOfAt = data.value.indexOf("@");
-        if (indexOfAt === -1)
-            InspectorTest.addResult("Can't find @ in " + data.value);
-        return parseInt(data.value.substring(indexOfAt + 1), 10);
+        if (!data.nodeId)
+            InspectorTest.addResult("No nodeId field in " + JSON.stringify(data));
+        return parseInt(data.nodeId, 10);
     }
     var comparator = {
         text: simpleComparator,
@@ -305,7 +302,7 @@
     callback = InspectorTest.safeWrap(callback);
     function propertyMatcher(data)
     {
-        return data.value === "(GC roots): @3";
+        return data.value === "(GC roots)";
     }
     var gcRoots = InspectorTest.findRow("object", propertyMatcher);
     InspectorTest.assertEquals(true, !!gcRoots, "GC roots row");

Modified: trunk/Source/WebCore/ChangeLog (106807 => 106808)


--- trunk/Source/WebCore/ChangeLog	2012-02-06 16:10:13 UTC (rev 106807)
+++ trunk/Source/WebCore/ChangeLog	2012-02-06 16:20:23 UTC (rev 106808)
@@ -1,3 +1,25 @@
+2012-02-06  Alexei Filippov  <[email protected]>
+
+        Web Inspector: Redesign summary view / retaining tree contents
+        https://bugs.webkit.org/show_bug.cgi?id=77870
+
+        Reviewed by Pavel Feldman.
+
+        1. Make object IDs less contrast.
+        2. Put array indices in [].
+        3. Do not write type if it's just "Object".
+
+        * inspector/front-end/DetailedHeapshotGridNodes.js:
+        (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
+        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
+        (WebInspector.HeapSnapshotObjectNode.prototype._emptyData):
+        (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData):
+        (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):
+        (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
+        * inspector/front-end/heapProfiler.css:
+        (.detailed-heapshot-view .console-formatted-id):
+        (.detailed-heapshot-view td.object-column span.grayed):
+
 2012-02-06  No'am Rosenthal  <[email protected]>
 
         [Texmap][Qt] Avoid an image copy when uploading textures in WebKit1

Modified: trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js (106807 => 106808)


--- trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-02-06 16:10:13 UTC (rev 106807)
+++ trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-02-06 16:20:23 UTC (rev 106808)
@@ -239,6 +239,12 @@
         valueSpan.className = "value console-formatted-" + data.valueStyle;
         valueSpan.textContent = data.value;
         div.appendChild(valueSpan);
+        var idSpan = document.createElement("span");
+        idSpan.className = "console-formatted-id";
+        idSpan.textContent = " @" + data["nodeId"];
+        div.appendChild(idSpan);
+        if (this._postfixObjectCell)
+            this._postfixObjectCell(div, data);
         cell.appendChild(div);
         cell.addStyleClass("disclosure");
         if (this.depth)
@@ -267,7 +273,7 @@
             valueStyle = "string";
             break;
         case "closure":
-            value = "function " + value + "()";
+            value = "function" + (value ? " " : "") + value + "()";
             valueStyle = "function";
             break;
         case "number":
@@ -280,14 +286,16 @@
             if (!value)
                 value = "[]";
             else
-                value += " []";
+                value += "[]";
             break;
         };
         if (this.hasHoverMessage)
             valueStyle += " highlight";
+        if (value === "Object")
+            value = "";
         if (this.detachedDOMTreeNode)
             valueStyle += " detached-dom-tree-node";
-        data["object"] = { valueStyle: valueStyle, value: value + ": @" + this.snapshotNodeId };
+        data["object"] = { valueStyle: valueStyle, value: value, nodeId: this.snapshotNodeId };
 
         var view = this.dataGrid.snapshotView;
         data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);
@@ -430,7 +438,7 @@
 
     _emptyData: function()
     {
-        return {count:"", addedCount: "", removedCount: "", countDelta:"", addedSize: "", removedSize: "", sizeDelta: ""};
+        return { count: "", addedCount: "", removedCount: "", countDelta: "", addedSize: "", removedSize: "", sizeDelta: "" };
     },
 
     _enhanceData: function(data)
@@ -446,6 +454,9 @@
         case "hidden":
             nameClass = "console-formatted-null";
             break;
+        case "element":
+            name = "[" + name + "]";
+            break;
         }
         data["object"].nameClass = nameClass;
         data["object"].name = name;
@@ -454,30 +465,17 @@
 
     _prefixObjectCell: function(div, data)
     {
-        if (this.showRetainingEdges) {
-            if (this._cycledWithAncestorGridNode)
-                div.className += " cycled-ancessor-node";
-            var referenceNameSpan = document.createElement("span");
-            referenceNameSpan.className = "name";
-            referenceNameSpan.textContent = this._referenceName + " ";
-            div.appendChild(referenceNameSpan);
+        if (this.showRetainingEdges && this._cycledWithAncestorGridNode)
+            div.className += " cycled-ancessor-node";
 
-            var separatorSpan = document.createElement("span");
-            separatorSpan.className = "separator";
-            separatorSpan.textContent = " of ";
-            div.appendChild(separatorSpan);
-
-            return;
-        }
-
         var nameSpan = document.createElement("span");
         nameSpan.className = data.nameClass;
         nameSpan.textContent = data.name;
         div.appendChild(nameSpan);
 
         var separatorSpan = document.createElement("span");
-        separatorSpan.className = "separator";
-        separatorSpan.textContent = ": ";
+        separatorSpan.className = "grayed";
+        separatorSpan.textContent = this.showRetainingEdges ? " in " : " :: ";
         div.appendChild(separatorSpan);
     }
 }
@@ -617,7 +615,7 @@
 
     get data()
     {
-        var data = "" this._name};
+        var data = { object: this._name };
         var view = this.dataGrid.snapshotView;
         data["count"] =  Number.withThousandsSeparator(this._count);
         data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);

Modified: trunk/Source/WebCore/inspector/front-end/heapProfiler.css (106807 => 106808)


--- trunk/Source/WebCore/inspector/front-end/heapProfiler.css	2012-02-06 16:10:13 UTC (rev 106807)
+++ trunk/Source/WebCore/inspector/front-end/heapProfiler.css	2012-02-06 16:20:23 UTC (rev 106808)
@@ -134,6 +134,10 @@
     white-space: nowrap;
 }
 
+.detailed-heapshot-view .console-formatted-id {
+    color: grey;
+}
+
 .detailed-heapshot-view .data-grid tr.selected * {
     color: inherit;
 }
@@ -208,6 +212,10 @@
     background-color: rgb(255, 255, 200);
 }
 
+.detailed-heapshot-view td.object-column span.grayed {
+    color: gray;
+}
+
 .heapshot-help-status-bar-item .glyph {
     -webkit-mask-position: -160px 0;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to