Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 13:58:56 +0000 (13:58 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 13:58:56 +0000 (13:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74289

WebCore objects have many hidden properties.
The Detailed Heap shapshot view shows all these props for a selected object.
The result view looks too heavy and users usually failed to find a useful information about the object.
Looks like such ability is unnecessary in the most cases.
I'd like to introduce a configurable property that will show/hide these props from the view.

Reviewed by Yury Semikhatsky.

* English.lproj/localizedStrings.js:
* inspector/front-end/DetailedHeapshotGridNodes.js:
* inspector/front-end/DetailedHeapshotView.js:
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/English.lproj/localizedStrings.js
Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js
Source/WebCore/inspector/front-end/DetailedHeapshotView.js
Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
Source/WebCore/inspector/front-end/SettingsScreen.js

index eba620fe8b9f58192af8591a2735b17ccc0ec467..d7da55c3c6bf2b8d2a5c930c53c3c63e08516a98 100644 (file)
@@ -1,3 +1,24 @@
+2011-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties.
+        https://bugs.webkit.org/show_bug.cgi?id=74289
+
+        WebCore objects have many hidden properties.
+        The Detailed Heap shapshot view shows all these props for a selected object.
+        The result view looks too heavy and users usually failed to find a useful information about the object.
+        Looks like such ability is unnecessary in the most cases.
+        I'd like to introduce a configurable property that will show/hide these props from the view.
+
+        Reviewed by Yury Semikhatsky.
+
+        * English.lproj/localizedStrings.js:
+        * inspector/front-end/DetailedHeapshotGridNodes.js:
+        * inspector/front-end/DetailedHeapshotView.js:
+        * inspector/front-end/HeapSnapshotProxy.js:
+        (WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
+        * inspector/front-end/SettingsScreen.js:
+        (WebInspector.SettingsScreen):
+
 2011-12-12  Kentaro Hara  <haraken@chromium.org>
 
         Unreviewed, rolling out r102556.
index fe9e491a3cd60b0e62c8764a441ee93c6743b8a4..b4343041470ea73d8e7b114375071db03d858d82 100644 (file)
Binary files a/Source/WebCore/English.lproj/localizedStrings.js and b/Source/WebCore/English.lproj/localizedStrings.js differ
index 5ce150f1d5fd6b75b8183e5f7569b93ec6d83c15..7b147ea3084362310a85f6bbf9982ede3f631e49 100644 (file)
@@ -343,7 +343,7 @@ WebInspector.HeapSnapshotObjectNode.prototype = {
 
     _createProvider: function(snapshot, nodeIndex)
     {
-        var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
+        var showHiddenData = WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get();
         return snapshot.createEdgesProvider(
             nodeIndex,
             "function(edge) {" +
index 6c4229faf408e243eb988bb0570190a9e21fce3d..bb27582135e19a741e7ea3c3089f57ce29615fd2 100644 (file)
@@ -394,7 +394,7 @@ WebInspector.HeapSnapshotDominatorsDataGrid.prototype.__proto__ = WebInspector.H
 
 WebInspector.HeapSnapshotPathFinderState = function(snapshot, nodeIndex, rootFilter)
 {
-    this._pathFinder = snapshot.createPathFinder(nodeIndex, !WebInspector.DetailedHeapshotView.prototype.showHiddenData);
+    this._pathFinder = snapshot.createPathFinder(nodeIndex, !WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get());
     this._pathFinder.updateRoots(rootFilter);
     this._foundCount = 0;
     this._foundCountMax = null;
@@ -1293,7 +1293,7 @@ WebInspector.DetailedHeapshotView.prototype = {
 
 WebInspector.DetailedHeapshotView.prototype.__proto__ = WebInspector.View.prototype;
 
-WebInspector.DetailedHeapshotView.prototype.showHiddenData = true;
+WebInspector.settings.showHeapSnapshotObjectsHiddenProperties = WebInspector.settings.createSetting("showHeaSnapshotObjectsHiddenProperties", false);
 
 WebInspector.DetailedHeapshotProfileType = function()
 {
index 257af26ff78583b7379bf07ab2022a8842c7fe34..143aaaaa734b84432aa420bb4ad79c7c999b3bb4 100644 (file)
@@ -340,9 +340,9 @@ WebInspector.HeapSnapshotProxy.prototype = {
         return this.callFactoryMethod(null, "createNodesProviderForDominator", "WebInspector.HeapSnapshotProviderProxy", nodeIndex, filter);
     },
 
-    createPathFinder: function(targetNodeIndex)
+    createPathFinder: function(targetNodeIndex, skipHidden)
     {
-        return this.callFactoryMethod(null, "createPathFinder", "WebInspector.HeapSnapshotPathFinderProxy", targetNodeIndex);
+        return this.callFactoryMethod(null, "createPathFinder", "WebInspector.HeapSnapshotPathFinderProxy", targetNodeIndex, skipHidden);
     },
 
     dispose: function()
index 0aeec4dcd56a30be37eb5f5abf5f8cbbfd616465..2dc66e5421f8ee9962e45568e30d1adec78ff9aa 100644 (file)
@@ -67,6 +67,9 @@ WebInspector.SettingsScreen = function()
     p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Show script folders"), WebInspector.settings.showScriptFolders));
     p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Search in content scripts"), WebInspector.settings.searchInContentScripts));
 
+    p = this._appendSection(WebInspector.UIString("Profiler"), true);
+    p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Show objects' hidden properties"), WebInspector.settings.showHeapSnapshotObjectsHiddenProperties));
+
     p = this._appendSection(WebInspector.UIString("Console"), true);
     p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Log XMLHttpRequests"), WebInspector.settings.monitoringXHREnabled));
     p.appendChild(this._createCheckboxSetting(WebInspector.UIString("Preserve log upon navigation"), WebInspector.settings.preserveConsoleLog));