Title: [135708] trunk
Revision
135708
Author
commit-qu...@webkit.org
Date
2012-11-26 05:37:20 -0800 (Mon, 26 Nov 2012)

Log Message

Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
https://bugs.webkit.org/show_bug.cgi?id=103240

Patch by Eugene Klyuchnikov <eus...@chromium.org> on 2012-11-26
Reviewed by Yury Semikhatsky.

Source/WebCore:

Cleanup: remove redundant dependency.

* inspector/front-end/HeapSnapshotDataGrids.js: Do not store view ref.
* inspector/front-end/HeapSnapshotGridNodes.js:
Removed unused assignments.
* inspector/front-end/HeapSnapshotView.js:
Do not pass self to data-grids.

LayoutTests:

Directly access current view instead of getting if from the data grid.

* inspector/profiler/heap-snapshot-test.js:
(initialize_HeapSnapshotTest):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135707 => 135708)


--- trunk/LayoutTests/ChangeLog	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/LayoutTests/ChangeLog	2012-11-26 13:37:20 UTC (rev 135708)
@@ -1,3 +1,15 @@
+2012-11-26  Eugene Klyuchnikov  <eus...@chromium.org>
+
+        Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
+        https://bugs.webkit.org/show_bug.cgi?id=103240
+
+        Reviewed by Yury Semikhatsky.
+
+        Directly access current view instead of getting if from the data grid.
+
+        * inspector/profiler/heap-snapshot-test.js:
+        (initialize_HeapSnapshotTest):
+
 2012-11-26  Jussi Kukkonen  <jussi.kukko...@intel.com>
 
         [EFL] Gardening: update test expectations

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js (135707 => 135708)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js	2012-11-26 13:37:20 UTC (rev 135708)
@@ -341,7 +341,7 @@
         }
     };
     this._currentGrid()._mouseDownInDataTable(event);
-    var rootNode = InspectorTest._currentGrid().snapshotView.retainmentDataGrid.rootNode();
+    var rootNode = InspectorTest._currentProfileView().retainmentDataGrid.rootNode();
     function populateComplete()
     {
         rootNode.removeEventListener("populate complete", populateComplete, this);
@@ -743,9 +743,14 @@
     return InspectorTest._currentGrid()._columnsArray;
 };
 
+InspectorTest._currentProfileView = function()
+{
+    return WebInspector.panels.profiles.visibleView;
+};
+
 InspectorTest._currentGrid = function()
 {
-    return WebInspector.panels.profiles.visibleView.dataGrid;
+    return this._currentProfileView().dataGrid;
 };
 
 InspectorTest._snapshotViewShown = function()

Modified: trunk/Source/WebCore/ChangeLog (135707 => 135708)


--- trunk/Source/WebCore/ChangeLog	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/Source/WebCore/ChangeLog	2012-11-26 13:37:20 UTC (rev 135708)
@@ -1,3 +1,18 @@
+2012-11-26  Eugene Klyuchnikov  <eus...@chromium.org>
+
+        Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
+        https://bugs.webkit.org/show_bug.cgi?id=103240
+
+        Reviewed by Yury Semikhatsky.
+
+        Cleanup: remove redundant dependency.
+
+        * inspector/front-end/HeapSnapshotDataGrids.js: Do not store view ref.
+        * inspector/front-end/HeapSnapshotGridNodes.js:
+        Removed unused assignments.
+        * inspector/front-end/HeapSnapshotView.js:
+        Do not pass self to data-grids.
+
 2012-11-26  Zeno Albisser  <z...@webkit.org>
 
         GraphicsSurface should only store its size in a single place.

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js (135707 => 135708)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js	2012-11-26 13:37:20 UTC (rev 135708)
@@ -438,9 +438,8 @@
 }
 
 WebInspector.HeapSnapshotContainmentDataGrid.prototype = {
-    setDataSource: function(snapshotView, snapshot, nodeIndex)
+    setDataSource: function(snapshot, nodeIndex)
     {
-        this.snapshotView = snapshotView;
         this.snapshot = snapshot;
         var node = new WebInspector.HeapSnapshotNode(snapshot, nodeIndex || snapshot.rootNodeIndex);
         var fakeEdge = { node: node };
@@ -552,9 +551,8 @@
         this.snapshot.nodeClassName(parseInt(id, 10), didGetClassName.bind(this));
     },
 
-    setDataSource: function(snapshotView, snapshot)
+    setDataSource: function(snapshot)
     {
-        this.snapshotView = snapshotView;
         this.snapshot = snapshot;
         if (this._profileIndex === -1)
             this._populateChildren();
@@ -645,9 +643,8 @@
         }[sortColumn];
     },
 
-    setDataSource: function(snapshotView, snapshot)
+    setDataSource: function(snapshot)
     {
-        this.snapshotView = snapshotView;
         this.snapshot = snapshot;
     },
 
@@ -716,9 +713,8 @@
         return 25;
     },
 
-    setDataSource: function(snapshotView, snapshot)
+    setDataSource: function(snapshot)
     {
-        this.snapshotView = snapshotView;
         this.snapshot = snapshot;
 
         var fakeNode = { nodeIndex: this.snapshot.rootNodeIndex };

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js (135707 => 135708)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2012-11-26 13:37:20 UTC (rev 135708)
@@ -444,7 +444,6 @@
             valueStyle += " detached-dom-tree-node";
         data["object"] = { valueStyle: valueStyle, value: value, nodeId: this.snapshotNodeId };
 
-        var view = this.dataGrid.snapshotView;
         data["distanceToWindow"] =  this._distanceToWindow;
         data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);
         data["retainedSize"] = Number.withThousandsSeparator(this._retainedSize);
@@ -827,7 +826,6 @@
     get data()
     {
         var data = { object: this._name };
-        var view = this.dataGrid.snapshotView;
         data["count"] =  Number.withThousandsSeparator(this._count);
         data["distanceToWindow"] =  this._distanceToWindow;
         data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js (135707 => 135708)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2012-11-26 12:40:40 UTC (rev 135707)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2012-11-26 13:37:20 UTC (rev 135708)
@@ -153,7 +153,7 @@
             this.baseSelectElement.selectedIndex = profileIndex - 1;
         else
             this.baseSelectElement.selectedIndex = profileIndex;
-        this.dataGrid.setDataSource(this, heapSnapshotProxy);
+        this.dataGrid.setDataSource(heapSnapshotProxy);
     }
 }
 
@@ -463,7 +463,7 @@
     _setRetainmentDataGridSource: function(nodeItem)
     {
         if (nodeItem && nodeItem.snapshotNodeIndex)
-            this.retainmentDataGrid.setDataSource(this, nodeItem.isDeletedNode ? nodeItem.dataGrid.baseSnapshot : nodeItem.dataGrid.snapshot, nodeItem.snapshotNodeIndex);
+            this.retainmentDataGrid.setDataSource(nodeItem.isDeletedNode ? nodeItem.dataGrid.baseSnapshot : nodeItem.dataGrid.snapshot, nodeItem.snapshotNodeIndex);
         else
             this.retainmentDataGrid.reset();
     },
@@ -509,7 +509,7 @@
     _updateDataSourceAndView: function()
     {
         var dataGrid = this.dataGrid;
-        if (dataGrid.snapshotView)
+        if (dataGrid.snapshot)
             return;
 
         this.profile.load(didLoadSnapshot.bind(this));
@@ -518,7 +518,7 @@
             if (this.dataGrid !== dataGrid)
                 return;
             if (dataGrid.snapshot !== snapshotProxy)
-                dataGrid.setDataSource(this, snapshotProxy);
+                dataGrid.setDataSource(snapshotProxy);
             if (dataGrid === this.diffDataGrid) {
                 if (!this._baseProfileUid)
                     this._baseProfileUid = this._profiles()[this.baseSelectElement.selectedIndex].uid;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to