Changeset 133174 in webkit


Ignore:
Timestamp:
Nov 1, 2012 8:16:25 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: make component subitems use parent color in native memory snapshots.
https://bugs.webkit.org/show_bug.cgi?id=100876

A component subitems use the color of the component itself if the color
is not explicitly specified for the subitem.

Patch by Alexei Filippov <alph@chromium.org> on 2012-11-01
Reviewed by Yury Semikhatsky.

  • inspector/front-end/NativeMemorySnapshotView.js:

(WebInspector.NativeSnapshotNode.prototype._createSizeCell):
(WebInspector.MemoryBlockViewProperties._initialize):
(WebInspector.MemoryBlockViewProperties._forMemoryBlock):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r133172 r133174  
     12012-11-01  Alexei Filippov  <alph@chromium.org>
     2
     3        Web Inspector: make component subitems use parent color in native memory snapshots.
     4        https://bugs.webkit.org/show_bug.cgi?id=100876
     5
     6        A component subitems use the color of the component itself if the color
     7        is not explicitly specified for the subitem.
     8
     9        Reviewed by Yury Semikhatsky.
     10
     11        * inspector/front-end/NativeMemorySnapshotView.js:
     12        (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
     13        (WebInspector.MemoryBlockViewProperties._initialize):
     14        (WebInspector.MemoryBlockViewProperties._forMemoryBlock):
     15
    1162012-11-01  Emil A Eklund  <eae@chromium.org>
    217
  • trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js

    r133040 r133174  
    107107    _createSizeCell: function(columnIdentifier)
    108108    {
    109         var viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(this._nodeData);
     109        var cell = this;
     110        var viewProperties = null;
     111        while (!viewProperties || viewProperties._fillStyle === "inherit") {
     112            viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(cell._nodeData);
     113            cell = cell.parent;
     114        }
     115
    110116        var sizeKiB = this._nodeData.size / 1024;
    111117        var totalSize = this._profile.size;
     
    312318    addBlock("hsl(220, 80%,  70%)", "Page", "Page structures");
    313319    addBlock("hsl(100, 60%,  50%)", "JSHeap", "JavaScript heap");
    314     addBlock("hsl(100, 80%,  80%)", "JSHeap.Used", "Used JavaScript heap");
    315320    addBlock("hsl( 90, 40%,  80%)", "JSExternalResources", "JavaScript external resources");
    316321    addBlock("hsl( 90, 60%,  80%)", "JSExternalArrays", "JavaScript external arrays");
    317322    addBlock("hsl( 90, 60%,  80%)", "JSExternalStrings", "JavaScript external strings");
    318323    addBlock("hsl(  0, 80%,  60%)", "WebInspector", "Inspector data");
    319     addBlock("hsl( 30, 80%,  80%)", "MemoryCache", "Memory cache resources");
     324    addBlock("hsl( 36, 90%,  50%)", "MemoryCache", "Memory cache resources");
    320325    addBlock("hsl( 40, 80%,  80%)", "GlyphCache", "Glyph cache resources");
    321326    addBlock("hsl( 35, 80%,  80%)", "DOMStorageCache", "DOM storage cache");
    322327    addBlock("hsl( 60, 80%,  60%)", "RenderTree", "Render tree");
    323     addBlock("hsl( 60, 80%,  60%)", "RenderTree.Used", "Render tree used");
    324328}
    325329
     
    330334    if (result)
    331335        return result;
    332     return new WebInspector.MemoryBlockViewProperties("rgba(128, 128, 128, 0.8)", memoryBlock.name, memoryBlock.name);
     336    return new WebInspector.MemoryBlockViewProperties("inherit", memoryBlock.name, memoryBlock.name);
    333337}
    334338
Note: See TracChangeset for help on using the changeset viewer.