Changeset 106808 in webkit


Ignore:
Timestamp:
Feb 6, 2012 8:20:23 AM (12 years ago)
Author:
loislo@chromium.org
Message:

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

Patch by Alexei Filippov <alexeif@chromium.org> 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):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106801 r106808  
     12012-02-06  Alexei Filippov  <alexeif@chromium.org>
     2
     3        Web Inspector: Redesign summary view / retaining tree contents
     4        https://bugs.webkit.org/show_bug.cgi?id=77870
     5
     6        Reviewed by Pavel Feldman.
     7
     8        1. Make object IDs less contrast.
     9        2. Put array indices in [].
     10        3. Do not write type if it's just "Object".
     11
     12        * inspector/profiler/detailed-heapshots-test.js:
     13        (initialize_DetailedHeapshotTest.):
     14        (initialize_DetailedHeapshotTest):
     15
    1162012-02-03  Hans Wennborg  <hans@chromium.org>
    217
  • trunk/LayoutTests/inspector/profiler/detailed-heapshots-test.js

    r105874 r106808  
    123123    {
    124124        data = JSON.parse(data);
    125         if (!data.value)
    126             InspectorTest.addResult("No value field in " + JSON.stringify(data));
    127         var indexOfAt = data.value.indexOf("@");
    128         if (indexOfAt === -1)
    129             InspectorTest.addResult("Can't find @ in " + data.value);
    130         return parseInt(data.value.substring(indexOfAt + 1), 10);
     125        if (!data.nodeId)
     126            InspectorTest.addResult("No nodeId field in " + JSON.stringify(data));
     127        return parseInt(data.nodeId, 10);
    131128    }
    132129    var comparator = {
     
    306303    function propertyMatcher(data)
    307304    {
    308         return data.value === "(GC roots): @3";
     305        return data.value === "(GC roots)";
    309306    }
    310307    var gcRoots = InspectorTest.findRow("object", propertyMatcher);
  • trunk/Source/WebCore/ChangeLog

    r106807 r106808  
     12012-02-06  Alexei Filippov  <alexeif@chromium.org>
     2
     3        Web Inspector: Redesign summary view / retaining tree contents
     4        https://bugs.webkit.org/show_bug.cgi?id=77870
     5
     6        Reviewed by Pavel Feldman.
     7
     8        1. Make object IDs less contrast.
     9        2. Put array indices in [].
     10        3. Do not write type if it's just "Object".
     11
     12        * inspector/front-end/DetailedHeapshotGridNodes.js:
     13        (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
     14        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
     15        (WebInspector.HeapSnapshotObjectNode.prototype._emptyData):
     16        (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData):
     17        (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):
     18        (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
     19        * inspector/front-end/heapProfiler.css:
     20        (.detailed-heapshot-view .console-formatted-id):
     21        (.detailed-heapshot-view td.object-column span.grayed):
     22
    1232012-02-06  No'am Rosenthal  <noam.rosenthal@nokia.com>
    224
  • trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js

    r106778 r106808  
    240240        valueSpan.textContent = data.value;
    241241        div.appendChild(valueSpan);
     242        var idSpan = document.createElement("span");
     243        idSpan.className = "console-formatted-id";
     244        idSpan.textContent = " @" + data["nodeId"];
     245        div.appendChild(idSpan);
     246        if (this._postfixObjectCell)
     247            this._postfixObjectCell(div, data);
    242248        cell.appendChild(div);
    243249        cell.addStyleClass("disclosure");
     
    268274            break;
    269275        case "closure":
    270             value = "function " + value + "()";
     276            value = "function" + (value ? " " : "") + value + "()";
    271277            valueStyle = "function";
    272278            break;
     
    281287                value = "[]";
    282288            else
    283                 value += " []";
     289                value += "[]";
    284290            break;
    285291        };
    286292        if (this.hasHoverMessage)
    287293            valueStyle += " highlight";
     294        if (value === "Object")
     295            value = "";
    288296        if (this.detachedDOMTreeNode)
    289297            valueStyle += " detached-dom-tree-node";
    290         data["object"] = { valueStyle: valueStyle, value: value + ": @" + this.snapshotNodeId };
     298        data["object"] = { valueStyle: valueStyle, value: value, nodeId: this.snapshotNodeId };
    291299
    292300        var view = this.dataGrid.snapshotView;
     
    431439    _emptyData: function()
    432440    {
    433         return {count:"", addedCount: "", removedCount: "", countDelta:"", addedSize: "", removedSize: "", sizeDelta: ""};
     441        return { count: "", addedCount: "", removedCount: "", countDelta: "", addedSize: "", removedSize: "", sizeDelta: "" };
    434442    },
    435443
     
    447455            nameClass = "console-formatted-null";
    448456            break;
     457        case "element":
     458            name = "[" + name + "]";
     459            break;
    449460        }
    450461        data["object"].nameClass = nameClass;
     
    455466    _prefixObjectCell: function(div, data)
    456467    {
    457         if (this.showRetainingEdges) {
    458             if (this._cycledWithAncestorGridNode)
    459                 div.className += " cycled-ancessor-node";
    460             var referenceNameSpan = document.createElement("span");
    461             referenceNameSpan.className = "name";
    462             referenceNameSpan.textContent = this._referenceName + " ";
    463             div.appendChild(referenceNameSpan);
    464 
    465             var separatorSpan = document.createElement("span");
    466             separatorSpan.className = "separator";
    467             separatorSpan.textContent = " of ";
    468             div.appendChild(separatorSpan);
    469 
    470             return;
    471         }
     468        if (this.showRetainingEdges && this._cycledWithAncestorGridNode)
     469            div.className += " cycled-ancessor-node";
    472470
    473471        var nameSpan = document.createElement("span");
     
    477475
    478476        var separatorSpan = document.createElement("span");
    479         separatorSpan.className = "separator";
    480         separatorSpan.textContent = ": ";
     477        separatorSpan.className = "grayed";
     478        separatorSpan.textContent = this.showRetainingEdges ? " in " : " :: ";
    481479        div.appendChild(separatorSpan);
    482480    }
     
    618616    get data()
    619617    {
    620         var data = {object: this._name};
     618        var data = { object: this._name };
    621619        var view = this.dataGrid.snapshotView;
    622620        data["count"] =  Number.withThousandsSeparator(this._count);
  • trunk/Source/WebCore/inspector/front-end/heapProfiler.css

    r106755 r106808  
    135135}
    136136
     137.detailed-heapshot-view .console-formatted-id {
     138    color: grey;
     139}
     140
    137141.detailed-heapshot-view .data-grid tr.selected * {
    138142    color: inherit;
     
    209213}
    210214
     215.detailed-heapshot-view td.object-column span.grayed {
     216    color: gray;
     217}
     218
    211219.heapshot-help-status-bar-item .glyph {
    212220    -webkit-mask-position: -160px 0;
Note: See TracChangeset for help on using the changeset viewer.