Title: [133174] trunk/Source/WebCore
Revision
133174
Author
commit-qu...@webkit.org
Date
2012-11-01 08:16:25 -0700 (Thu, 01 Nov 2012)

Log 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 <a...@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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133173 => 133174)


--- trunk/Source/WebCore/ChangeLog	2012-11-01 15:06:41 UTC (rev 133173)
+++ trunk/Source/WebCore/ChangeLog	2012-11-01 15:16:25 UTC (rev 133174)
@@ -1,3 +1,18 @@
+2012-11-01  Alexei Filippov  <a...@chromium.org>
+
+        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.
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/NativeMemorySnapshotView.js:
+        (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
+        (WebInspector.MemoryBlockViewProperties._initialize):
+        (WebInspector.MemoryBlockViewProperties._forMemoryBlock):
+
 2012-11-01  Emil A Eklund  <e...@chromium.org>
 
         [subpixel] Change intrinsicSize to LayoutUnit

Modified: trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js (133173 => 133174)


--- trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js	2012-11-01 15:06:41 UTC (rev 133173)
+++ trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js	2012-11-01 15:16:25 UTC (rev 133174)
@@ -106,7 +106,13 @@
      */
     _createSizeCell: function(columnIdentifier)
     {
-        var viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(this._nodeData);
+        var cell = this;
+        var viewProperties = null;
+        while (!viewProperties || viewProperties._fillStyle === "inherit") {
+            viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(cell._nodeData);
+            cell = cell.parent;
+        }
+
         var sizeKiB = this._nodeData.size / 1024;
         var totalSize = this._profile.size;
         var percentage = this._nodeData.size / totalSize  * 100;
@@ -311,16 +317,14 @@
     addBlock("hsl(  0,  0%,  80%)", "Other", "Other");
     addBlock("hsl(220, 80%,  70%)", "Page", "Page structures");
     addBlock("hsl(100, 60%,  50%)", "JSHeap", "_javascript_ heap");
-    addBlock("hsl(100, 80%,  80%)", "JSHeap.Used", "Used _javascript_ heap");
     addBlock("hsl( 90, 40%,  80%)", "JSExternalResources", "_javascript_ external resources");
     addBlock("hsl( 90, 60%,  80%)", "JSExternalArrays", "_javascript_ external arrays");
     addBlock("hsl( 90, 60%,  80%)", "JSExternalStrings", "_javascript_ external strings");
     addBlock("hsl(  0, 80%,  60%)", "WebInspector", "Inspector data");
-    addBlock("hsl( 30, 80%,  80%)", "MemoryCache", "Memory cache resources");
+    addBlock("hsl( 36, 90%,  50%)", "MemoryCache", "Memory cache resources");
     addBlock("hsl( 40, 80%,  80%)", "GlyphCache", "Glyph cache resources");
     addBlock("hsl( 35, 80%,  80%)", "DOMStorageCache", "DOM storage cache");
     addBlock("hsl( 60, 80%,  60%)", "RenderTree", "Render tree");
-    addBlock("hsl( 60, 80%,  60%)", "RenderTree.Used", "Render tree used");
 }
 
 WebInspector.MemoryBlockViewProperties._forMemoryBlock = function(memoryBlock)
@@ -329,7 +333,7 @@
     var result = WebInspector.MemoryBlockViewProperties._standardBlocks[memoryBlock.name];
     if (result)
         return result;
-    return new WebInspector.MemoryBlockViewProperties("rgba(128, 128, 128, 0.8)", memoryBlock.name, memoryBlock.name);
+    return new WebInspector.MemoryBlockViewProperties("inherit", memoryBlock.name, memoryBlock.name);
 }
 
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to