Title: [133040] trunk/Source/WebCore
Revision
133040
Author
[email protected]
Date
2012-10-31 09:46:17 -0700 (Wed, 31 Oct 2012)

Log Message

Web Inspector: Add total node to native memory snapshot tree
https://bugs.webkit.org/show_bug.cgi?id=100843

Patch by Alexei Filippov <[email protected]> on 2012-10-31
Reviewed by Yury Semikhatsky.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotDataGrid):
(WebInspector.NativeSnapshotNode):
(WebInspector.MemoryBlockViewProperties._initialize):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133039 => 133040)


--- trunk/Source/WebCore/ChangeLog	2012-10-31 16:45:44 UTC (rev 133039)
+++ trunk/Source/WebCore/ChangeLog	2012-10-31 16:46:17 UTC (rev 133040)
@@ -1,3 +1,15 @@
+2012-10-31  Alexei Filippov  <[email protected]>
+
+        Web Inspector: Add total node to native memory snapshot tree
+        https://bugs.webkit.org/show_bug.cgi?id=100843
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/NativeMemorySnapshotView.js:
+        (WebInspector.NativeSnapshotDataGrid):
+        (WebInspector.NativeSnapshotNode):
+        (WebInspector.MemoryBlockViewProperties._initialize):
+
 2012-10-31  Arpita Bahuguna  <[email protected]>
 
         Table with percentage column widths doesn't scale to fill the entire width of a table containing it

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


--- trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js	2012-10-31 16:45:44 UTC (rev 133039)
+++ trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js	2012-10-31 16:46:17 UTC (rev 133040)
@@ -31,7 +31,7 @@
 /**
  * @constructor
  * @extends {WebInspector.View}
- * @param {WebInspector.ProfileType} profile
+ * @param {WebInspector.NativeMemoryProfileHeader} profile
  */
 WebInspector.NativeMemorySnapshotView = function(profile)
 {
@@ -59,8 +59,10 @@
         size: { title: WebInspector.UIString("Size"), sortable: false },
     };
     WebInspector.DataGrid.call(this, columns);
-    this.setRootNode(new WebInspector.NativeSnapshotNode(profile, profile));
-    this.rootNode()._populate();
+    this.setRootNode(new WebInspector.DataGridNode(null, true));
+    var totalNode = new WebInspector.NativeSnapshotNode(profile, profile);
+    this.rootNode().appendChild(totalNode);
+    totalNode.expand();
 }
 
 WebInspector.NativeSnapshotDataGrid.prototype = {
@@ -79,7 +81,7 @@
     this._profile = profile;
     var viewProperties = WebInspector.MemoryBlockViewProperties._forMemoryBlock(nodeData);
     var data = { object: viewProperties._description, size: this._nodeData.size };
-    var hasChildren = nodeData.children && nodeData.children.length !== 0;
+    var hasChildren = !!nodeData.children && nodeData.children.length !== 0;
     WebInspector.DataGridNode.call(this, data, hasChildren);
     this.addEventListener("populate", this._populate, this);
 }
@@ -87,7 +89,7 @@
 WebInspector.NativeSnapshotNode.prototype = {
     /**
      * @override
-     * @param {string} profilesPanel
+     * @param {string} columnIdentifier
      * @return {Element}
      */
     createCell: function(columnIdentifier)
@@ -304,7 +306,7 @@
     {
         WebInspector.MemoryBlockViewProperties._standardBlocks[name] = new WebInspector.MemoryBlockViewProperties(fillStyle, name, WebInspector.UIString(description));
     }
-    addBlock("hsl(  0,  0%, 100%)", "ProcessPrivateMemory", "Total");
+    addBlock("hsl(  0,  0%,  60%)", "ProcessPrivateMemory", "Total");
     addBlock("hsl(  0,  0%,  80%)", "OwnersTypePlaceholder", "OwnersTypePlaceholder");
     addBlock("hsl(  0,  0%,  80%)", "Other", "Other");
     addBlock("hsl(220, 80%,  70%)", "Page", "Page structures");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to