<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199379] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199379">199379</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2016-04-12 12:35:12 -0700 (Tue, 12 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
https://bugs.webkit.org/show_bug.cgi?id=156419
&lt;rdar://problem/25633863&gt;

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Remove strings, and fix sort.

* UserInterface/Models/HeapSnapshotRootPath.js:
(WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge):
(WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess):
(WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
(WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
Provide a helper to get an path component string for an individual edge.

* UserInterface/Models/PropertyPreview.js:
(WebInspector.PropertyPreview):
Fix an assert that may have errantly fired for an empty string name.

* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
Include &quot;hasChildren&quot; property in the original proxy message.

(WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
The method now also returns a list of edges for each of the retained nodes.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
An instance DataGrid node can now show children. It can expand to show
its retained node graph.

* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainers):
(HeapSnapshot.prototype.serializeNode):
Remove unnecessary calls to bind in favor of using the `thisObject` argument.

(HeapSnapshot.prototype.retainedNodes):
Return a parallel list of edges for each of the nodes.

* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.shown):
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue): Deleted.
(WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem): Deleted.
* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects): Deleted.
(WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects): Deleted.
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects): Deleted.
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects): Deleted.
* UserInterface/Views/HeapSnapshotSummaryContentView.js:
Remove the show/hide internal objects button. In the Instances view we will
only show non-Internal objects at the top level, and show internal objects
when those instances are expanded.

LayoutTests:

* inspector/unit-tests/heap-snapshot-expected.txt:
* inspector/unit-tests/heap-snapshot.html:
Add a quick test that retainedNodes returns a list of edges.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsheapsnapshotexpectedtxt">trunk/LayoutTests/inspector/unit-tests/heap-snapshot-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsheapsnapshothtml">trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsHeapSnapshotRootPathjs">trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotRootPath.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsPropertyPreviewjs">trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPreview.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProxiesHeapSnapshotNodeProxyjs">trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClassDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClusterContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstanceDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesDataGridTreejs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceWorkersHeapSnapshotHeapSnapshotjs">trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/LayoutTests/ChangeLog        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-04-12  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
+        https://bugs.webkit.org/show_bug.cgi?id=156419
+        &lt;rdar://problem/25633863&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/unit-tests/heap-snapshot-expected.txt:
+        * inspector/unit-tests/heap-snapshot.html:
+        Add a quick test that retainedNodes returns a list of edges.
+
</ins><span class="cx"> 2016-04-12  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [RTL Scrollbars] Overlay scrollbars push contents inwards
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsheapsnapshotexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/heap-snapshot-expected.txt (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/heap-snapshot-expected.txt        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/LayoutTests/inspector/unit-tests/heap-snapshot-expected.txt        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> -- Running test case: HeapSnapshotNodeProxy.prototype.retainedNodes
</span><span class="cx"> PASS: Number of retained nodes should match.
</span><ins>+PASS: Number of edges should match the number of nodes.
</ins><span class="cx"> PASS: Node values should match.
</span><span class="cx"> 
</span><span class="cx"> -- Running test case: HeapSnapshotNodeProxy.prototype.retainers
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsheapsnapshothtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/LayoutTests/inspector/unit-tests/heap-snapshot.html        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -229,10 +229,11 @@
</span><span class="cx">             let expectedNodes = testSnapshotNodeForWindowObject.outgoingEdges.map((edge) =&gt; edge.to);
</span><span class="cx">             expectedNodes.sort((a, b) =&gt; a.id - b.id);
</span><span class="cx"> 
</span><del>-            snapshotNodeForWindowObject.retainedNodes((nodes) =&gt; {
</del><ins>+            snapshotNodeForWindowObject.retainedNodes((nodes, edges) =&gt; {
</ins><span class="cx">                 nodes.sort((a, b) =&gt; a.id - b.id);
</span><span class="cx">                 InspectorTest.assert(nodes.length &gt; 0, &quot;Test only makes since if there are retained nodes&quot;);
</span><span class="cx">                 InspectorTest.expectThat(nodes.length === expectedNodes.length, &quot;Number of retained nodes should match.&quot;);
</span><ins>+                InspectorTest.expectThat(nodes.length === edges.length, &quot;Number of edges should match the number of nodes.&quot;);
</ins><span class="cx">                 InspectorTest.expectThat(nodes.every((node, i) =&gt; compareNodes(node, expectedNodes[i])), &quot;Node values should match.&quot;);
</span><span class="cx">                 resolve();
</span><span class="cx">             });
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2016-04-12  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
+        https://bugs.webkit.org/show_bug.cgi?id=156419
+        &lt;rdar://problem/25633863&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Main.html:
+        Remove strings, and fix sort.
+
+        * UserInterface/Models/HeapSnapshotRootPath.js:
+        (WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge):
+        (WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess):
+        (WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
+        (WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
+        Provide a helper to get an path component string for an individual edge.
+
+        * UserInterface/Models/PropertyPreview.js:
+        (WebInspector.PropertyPreview):
+        Fix an assert that may have errantly fired for an empty string name.
+
+        * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
+        (WebInspector.HeapSnapshotNodeProxy):
+        (WebInspector.HeapSnapshotNodeProxy.deserialize):
+        Include &quot;hasChildren&quot; property in the original proxy message.
+
+        (WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
+        The method now also returns a list of edges for each of the retained nodes.
+
+        * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
+        (WebInspector.HeapSnapshotInstanceDataGridNode):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
+        An instance DataGrid node can now show children. It can expand to show
+        its retained node graph.
+
+        * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
+        (HeapSnapshot.instancesWithClassName):
+        (HeapSnapshot.prototype.dominatedNodes):
+        (HeapSnapshot.prototype.retainers):
+        (HeapSnapshot.prototype.serializeNode):
+        Remove unnecessary calls to bind in favor of using the `thisObject` argument.
+
+        (HeapSnapshot.prototype.retainedNodes):
+        Return a parallel list of edges for each of the nodes.
+
+        * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
+        * UserInterface/Views/HeapSnapshotClusterContentView.js:
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.shown):
+        (WebInspector.HeapSnapshotClusterContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems): Deleted.
+        (WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments): Deleted.
+        (WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting): Deleted.
+        (WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue): Deleted.
+        (WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem): Deleted.
+        * UserInterface/Views/HeapSnapshotInstancesContentView.js:
+        (WebInspector.HeapSnapshotInstancesContentView):
+        (WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects): Deleted.
+        (WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects): Deleted.
+        * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
+        (WebInspector.HeapSnapshotInstancesDataGridTree):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects): Deleted.
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects): Deleted.
+        * UserInterface/Views/HeapSnapshotSummaryContentView.js:
+        Remove the show/hide internal objects button. In the Instances view we will
+        only show non-Internal objects at the top level, and show internal objects
+        when those instances are expanded.
+
</ins><span class="cx"> 2016-04-12  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: clearing the console should exit all console groups
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -381,7 +381,6 @@
</span><span class="cx"> localizedStrings[&quot;Height&quot;] = &quot;Height&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide Replay Controls&quot;] = &quot;Hide Replay Controls&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide compositing borders&quot;] = &quot;Hide compositing borders&quot;;
</span><del>-localizedStrings[&quot;Hide internal objects&quot;] = &quot;Hide internal objects&quot;;
</del><span class="cx"> localizedStrings[&quot;Hide shadow DOM nodes&quot;] = &quot;Hide shadow DOM nodes&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide the details sidebar (%s)&quot;] = &quot;Hide the details sidebar (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide the navigation sidebar (%s)&quot;] = &quot;Hide the navigation sidebar (%s)&quot;;
</span><span class="lines">@@ -647,7 +646,6 @@
</span><span class="cx"> localizedStrings[&quot;Show Source&quot;] = &quot;Show Source&quot;;
</span><span class="cx"> localizedStrings[&quot;Show compositing borders&quot;] = &quot;Show compositing borders&quot;;
</span><span class="cx"> localizedStrings[&quot;Show console tab&quot;] = &quot;Show console tab&quot;;
</span><del>-localizedStrings[&quot;Show internal objects&quot;] = &quot;Show internal objects&quot;;
</del><span class="cx"> localizedStrings[&quot;Show only resources with issues.&quot;] = &quot;Show only resources with issues.&quot;;
</span><span class="cx"> localizedStrings[&quot;Show resources with and without issues.&quot;] = &quot;Show resources with and without issues.&quot;;
</span><span class="cx"> localizedStrings[&quot;Show shadow DOM nodes&quot;] = &quot;Show shadow DOM nodes&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -524,9 +524,9 @@
</span><span class="cx">     &lt;script src=&quot;Views/GoToLineDialog.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/GradientEditor.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/GradientSlider.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/HeapAllocationsTimelineDataGridNode.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/HeapAllocationsTimelineOverviewGraph.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/HeapAllocationsTimelineView.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;Views/HeapAllocationsTimelineDataGridNode.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script src=&quot;Views/HeapSnapshotClassDataGridNode.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/HeapSnapshotClusterContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/HeapSnapshotInstanceDataGridNode.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsHeapSnapshotRootPathjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotRootPath.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotRootPath.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotRootPath.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -50,6 +50,26 @@
</span><span class="cx">         return new WebInspector.HeapSnapshotRootPath(null);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static pathComponentForIndividualEdge(edge)
+    {
+        switch (edge.type) {
+        case WebInspector.HeapSnapshotEdgeProxy.EdgeType.Internal:
+            return null;
+        case WebInspector.HeapSnapshotEdgeProxy.EdgeType.Index:
+            return &quot;[&quot; + edge.data + &quot;]&quot;;
+        case WebInspector.HeapSnapshotEdgeProxy.EdgeType.Property:
+        case WebInspector.HeapSnapshotEdgeProxy.EdgeType.Variable:
+            if (WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess(edge.data))
+                return edge.data;
+            return &quot;[&quot; + doubleQuotedString(edge.data) + &quot;]&quot;;
+        }
+    }
+
+    static canPropertyNameBeDotAccess(propertyName)
+    {
+        return /^(?![0-9])\w+$/.test(propertyName);
+    }
+
</ins><span class="cx">     // Public
</span><span class="cx"> 
</span><span class="cx">     get node() { return this._node; }
</span><span class="lines">@@ -117,7 +137,7 @@
</span><span class="cx"> 
</span><span class="cx">     appendPropertyName(node, propertyName)
</span><span class="cx">     {
</span><del>-        let component = this._canPropertyNameBeDotAccess(propertyName) ? &quot;.&quot; + propertyName : &quot;[&quot; + doubleQuotedString(propertyName) + &quot;]&quot;;
</del><ins>+        let component = WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess(propertyName) ? &quot;.&quot; + propertyName : &quot;[&quot; + doubleQuotedString(propertyName) + &quot;]&quot;;
</ins><span class="cx">         return new WebInspector.HeapSnapshotRootPath(node, component, this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -151,13 +171,6 @@
</span><span class="cx"> 
</span><span class="cx">         console.error(&quot;Unexpected edge type&quot;, edge.type);
</span><span class="cx">     }
</span><del>-
-    // Private
-
-    _canPropertyNameBeDotAccess(propertyName)
-    {
-        return /^(?![0-9])\w+$/.test(propertyName);
-    }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotRootPath.SpecialPathComponent = {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsPropertyPreviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPreview.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPreview.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPreview.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">     {
</span><span class="cx">         super();
</span><span class="cx"> 
</span><del>-        console.assert(name);
</del><ins>+        console.assert(typeof name === &quot;string&quot;);
</ins><span class="cx">         console.assert(type);
</span><span class="cx">         console.assert(!value || typeof value === &quot;string&quot;);
</span><span class="cx">         console.assert(!valuePreview || valuePreview instanceof WebInspector.ObjectPreview);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProxiesHeapSnapshotNodeProxyjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotNodeProxy = class HeapSnapshotNodeProxy
</span><span class="cx"> {
</span><del>-    constructor(snapshotObjectId, identifier, className, size, retainedSize, internal, gcRoot)
</del><ins>+    constructor(snapshotObjectId, identifier, className, size, retainedSize, internal, gcRoot, hasChildren)
</ins><span class="cx">     {
</span><span class="cx">         this._proxyObjectId = snapshotObjectId;
</span><span class="cx"> 
</span><span class="lines">@@ -35,14 +35,15 @@
</span><span class="cx">         this.retainedSize = retainedSize;
</span><span class="cx">         this.internal = internal;
</span><span class="cx">         this.gcRoot = gcRoot;
</span><ins>+        this.hasChildren = hasChildren;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Static
</span><span class="cx"> 
</span><span class="cx">     static deserialize(objectId, serializedNode)
</span><span class="cx">     {
</span><del>-        let {id, className, size, retainedSize, internal, gcRoot} = serializedNode;
-        return new WebInspector.HeapSnapshotNodeProxy(objectId, id, className, size, retainedSize, internal, gcRoot);
</del><ins>+        let {id, className, size, retainedSize, internal, gcRoot, hasChildren} = serializedNode;
+        return new WebInspector.HeapSnapshotNodeProxy(objectId, id, className, size, retainedSize, internal, gcRoot, hasChildren);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Proxied
</span><span class="lines">@@ -78,8 +79,10 @@
</span><span class="cx"> 
</span><span class="cx">     retainedNodes(callback)
</span><span class="cx">     {
</span><del>-        WebInspector.HeapSnapshotWorkerProxy.singleton().callMethod(this._proxyObjectId, &quot;retainedNodes&quot;, this.id, (serializedNodes) =&gt; {
-            callback(serializedNodes.map(WebInspector.HeapSnapshotNodeProxy.deserialize.bind(null, this._proxyObjectId)));
</del><ins>+        WebInspector.HeapSnapshotWorkerProxy.singleton().callMethod(this._proxyObjectId, &quot;retainedNodes&quot;, this.id, ({retainedNodes: serializedNodes, edges: serializedEdges}) =&gt; {
+            let deserializedNodes = serializedNodes.map(WebInspector.HeapSnapshotNodeProxy.deserialize.bind(null, this._proxyObjectId));
+            let deserializedEdges = serializedEdges.map(WebInspector.HeapSnapshotEdgeProxy.deserialize.bind(null, this._proxyObjectId));
+            callback(deserializedNodes, deserializedEdges);
</ins><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClassDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -60,10 +60,10 @@
</span><span class="cx">             return Number.bytesToString(this._data.size);
</span><span class="cx"> 
</span><span class="cx">         if (columnIdentifier === &quot;className&quot;) {
</span><del>-            let {className, allInternal} = this._data;
</del><ins>+            let {className} = this._data;
</ins><span class="cx">             let fragment = document.createDocumentFragment();
</span><span class="cx">             let iconElement = fragment.appendChild(document.createElement(&quot;img&quot;));
</span><del>-            iconElement.classList.add(&quot;icon&quot;, WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName(className, allInternal));
</del><ins>+            iconElement.classList.add(&quot;icon&quot;, WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName(className));
</ins><span class="cx">             let nameElement = fragment.appendChild(document.createElement(&quot;span&quot;));
</span><span class="cx">             nameElement.classList.add(&quot;class-name&quot;);
</span><span class="cx">             nameElement.textContent = className;
</span><span class="lines">@@ -104,17 +104,13 @@
</span><span class="cx"> 
</span><span class="cx">             // Batch.
</span><span class="cx">             if (instances.length &gt; WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit) {
</span><del>-                // FIXME: This should respect the this._tree.includeInternalObjects setting.
</del><span class="cx">                 this._batched = true;
</span><span class="cx">                 this._fetchBatch(WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit);
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            for (let instance of this._instances) {
-                if (instance.internal &amp;&amp; !this._tree.includeInternalObjects)
-                    continue;
</del><ins>+            for (let instance of this._instances)
</ins><span class="cx">                 this.appendChild(new WebInspector.HeapSnapshotInstanceDataGridNode(instance, this._tree));
</span><del>-            }
</del><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClusterContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -44,14 +44,6 @@
</span><span class="cx">         this._summaryContentView = null;
</span><span class="cx">         this._instancesContentView = null;
</span><span class="cx"> 
</span><del>-        if (!WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting)
-            WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting = new WebInspector.Setting(&quot;heap-snapshot-cluster-content-view-show-internal-objects&quot;, false);
-
-        // FIXME: Need an image for showing / hiding internal objects.
-        this._showInternalObjectsButtonNavigationItem = new WebInspector.ActivateButtonNavigationItem(&quot;show-internal-objects&quot;, WebInspector.UIString(&quot;Show internal objects&quot;), WebInspector.UIString(&quot;Hide internal objects&quot;), &quot;Images/ShadowDOM.svg&quot;, 13, 13);
-        this._showInternalObjectsButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._toggleShowInternalObjectsSetting, this);
-        this._updateShowInternalObjectsButtonNavigationItem();
-
</del><span class="cx">         this._summaryPathComponent = createPathComponent.call(this, WebInspector.UIString(&quot;Summary&quot;), &quot;heap-snapshot-summary-icon&quot;, WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
</span><span class="cx">         this._instancesPathComponent = createPathComponent.call(this, WebInspector.UIString(&quot;Instances&quot;), &quot;heap-snapshot-instances-icon&quot;, WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier);
</span><span class="cx"> 
</span><span class="lines">@@ -115,22 +107,17 @@
</span><span class="cx">     get summaryContentView()
</span><span class="cx">     {
</span><span class="cx">         if (!this._summaryContentView)
</span><del>-            this._summaryContentView = new WebInspector.HeapSnapshotSummaryContentView(this._heapSnapshot, this._contentViewExtraArguments());
</del><ins>+            this._summaryContentView = new WebInspector.HeapSnapshotSummaryContentView(this._heapSnapshot);
</ins><span class="cx">         return this._summaryContentView;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     get instancesContentView()
</span><span class="cx">     {
</span><span class="cx">         if (!this._instancesContentView)
</span><del>-            this._instancesContentView = new WebInspector.HeapSnapshotInstancesContentView(this._heapSnapshot, this._contentViewExtraArguments());
</del><ins>+            this._instancesContentView = new WebInspector.HeapSnapshotInstancesContentView(this._heapSnapshot);
</ins><span class="cx">         return this._instancesContentView;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    get navigationItems()
-    {
-        return [this._showInternalObjectsButtonNavigationItem];
-    }
-
</del><span class="cx">     get selectionPathComponents()
</span><span class="cx">     {
</span><span class="cx">         let currentContentView = this._contentViewContainer.currentContentView;
</span><span class="lines">@@ -145,10 +132,8 @@
</span><span class="cx">     {
</span><span class="cx">         super.shown();
</span><span class="cx"> 
</span><del>-        if (this._shownInitialContent) {
-            this._updateViewsForShowInternalObjectsSettingValue();
</del><ins>+        if (this._shownInitialContent)
</ins><span class="cx">             return;
</span><del>-        }
</del><span class="cx"> 
</span><span class="cx">         this._showContentViewForIdentifier(this._currentContentViewSetting.value);
</span><span class="cx">     }
</span><span class="lines">@@ -184,11 +169,6 @@
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="cx"> 
</span><del>-    _contentViewExtraArguments()
-    {
-        return {showInternalObjects: WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value};
-    }
-
</del><span class="cx">     _pathComponentForContentView(contentView)
</span><span class="cx">     {
</span><span class="cx">         console.assert(contentView);
</span><span class="lines">@@ -244,30 +224,6 @@
</span><span class="cx">     {
</span><span class="cx">         this._showContentViewForIdentifier(event.data.pathComponent.representedObject);
</span><span class="cx">     }
</span><del>-
-    _toggleShowInternalObjectsSetting(event)
-    {
-        WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value = !WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value;
-
-        this._updateViewsForShowInternalObjectsSettingValue();
-    }
-
-    _updateViewsForShowInternalObjectsSettingValue(force)
-    {
-        let value = WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value;
-        if (this._showInternalObjectsButtonNavigationItem.activated === value)
-            return;
-
-        if (this._instancesContentView)
-            this._instancesContentView.showInternalObjects = value;
-
-        this._updateShowInternalObjectsButtonNavigationItem();
-    }
-
-    _updateShowInternalObjectsButtonNavigationItem()
-    {
-        this._showInternalObjectsButtonNavigationItem.activated = WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value;
-    }
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey = &quot;heap-snapshot-cluster-content-view-identifier&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstanceDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -25,17 +25,25 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotInstanceDataGridNode = class HeapSnapshotInstanceDataGridNode extends WebInspector.DataGridNode
</span><span class="cx"> {
</span><del>-    constructor(node, tree)
</del><ins>+    constructor(node, tree, edge)
</ins><span class="cx">     {
</span><del>-        super(node, false);
</del><ins>+        // Don't treat strings as having child nodes, even if they have a Structure.
+        let hasChildren = node.hasChildren &amp;&amp; node.className !== &quot;string&quot;;
</ins><span class="cx"> 
</span><ins>+        super(node, hasChildren);
+
</ins><span class="cx">         console.assert(node instanceof WebInspector.HeapSnapshotNodeProxy);
</span><ins>+        console.assert(!edge || edge instanceof WebInspector.HeapSnapshotEdgeProxy);
</ins><span class="cx"> 
</span><span class="cx">         this._node = node;
</span><span class="cx">         this._tree = tree;
</span><ins>+        this._edge = edge || null;
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Make instance grid nodes copyable.
</span><span class="cx">         this.copyable = false;
</span><ins>+
+        if (hasChildren)
+            this.addEventListener(&quot;populate&quot;, this._populate, this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Static
</span><span class="lines">@@ -121,6 +129,15 @@
</span><span class="cx">             let iconElement = containerElement.appendChild(document.createElement(&quot;img&quot;));
</span><span class="cx">             iconElement.classList.add(&quot;icon&quot;, WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName(className, internal));
</span><span class="cx"> 
</span><ins>+            if (this._edge) {
+                let nameElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
+                let edgeText = WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge(this._edge);
+                if (edgeText)
+                    nameElement.textContent = edgeText + &quot;: &quot; + this._node.className + &quot; &quot;;
+                else
+                    nameElement.textContent = this._node.className + &quot; &quot;;
+            }
+
</ins><span class="cx">             let idElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
</span><span class="cx">             idElement.classList.add(&quot;object-id&quot;);
</span><span class="cx">             idElement.textContent = &quot;@&quot; + id;
</span><span class="lines">@@ -180,11 +197,39 @@
</span><span class="cx"> 
</span><span class="cx">     sort()
</span><span class="cx">     {
</span><del>-        // No children to sort.
</del><ins>+        let children = this.children;
+        children.sort(this._tree._sortComparator);
+
+        for (let i = 0; i &lt; children.length; ++i) {
+            children[i]._recalculateSiblings(i);
+            children[i].sort();
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="cx"> 
</span><ins>+    _populate()
+    {
+        this.removeEventListener(&quot;populate&quot;, this._populate, this);
+
+        this._node.retainedNodes((instances, edges) =&gt; {
+            // Reference edge from instance so we can get it after sorting.
+            for (let i = 0; i &lt; instances.length; ++i)
+                instances[i].__edge = edges[i];
+
+            instances.sort((a, b) =&gt; {
+                let fakeDataGridNodeA = {data: a};
+                let fakeDataGridNodeB = {data: b};
+                return this._tree._sortComparator(fakeDataGridNodeA, fakeDataGridNodeB);
+            });
+
+            // FIXME: This should gracefully handle a node that references many objects.
+
+            for (let instance of instances)
+                this.appendChild(new WebInspector.HeapSnapshotInstanceDataGridNode(instance, this._tree, instance.__edge));
+        });        
+    }
+
</ins><span class="cx">     _contextMenuHandler(event)
</span><span class="cx">     {
</span><span class="cx">         let contextMenu = WebInspector.ContextMenu.createFromEvent(event);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotInstancesContentView = class HeapSnapshotInstancesContentView extends WebInspector.ContentView
</span><span class="cx"> {
</span><del>-    constructor(representedObject, extraArguments)
</del><ins>+    constructor(representedObject)
</ins><span class="cx">     {
</span><span class="cx">         console.assert(representedObject instanceof WebInspector.HeapSnapshotProxy || representedObject instanceof WebInspector.HeapSnapshotDiffProxy);
</span><span class="cx"> 
</span><span class="lines">@@ -33,8 +33,6 @@
</span><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;heap-snapshot&quot;);
</span><span class="cx"> 
</span><del>-        let {showInternalObjects} = extraArguments;
-
</del><span class="cx">         let columns = {
</span><span class="cx">             retainedSize: {
</span><span class="cx">                 title: WebInspector.UIString(&quot;Retained Size&quot;),
</span><span class="lines">@@ -68,7 +66,7 @@
</span><span class="cx">         this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
</span><span class="cx"> 
</span><span class="cx">         let sortComparator = WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator(this._dataGrid.sortColumnIdentifier, this._dataGrid.sortOrder);
</span><del>-        this._heapSnapshotDataGridTree = new WebInspector.HeapSnapshotInstancesDataGridTree(this.representedObject, sortComparator, showInternalObjects);
</del><ins>+        this._heapSnapshotDataGridTree = new WebInspector.HeapSnapshotInstancesDataGridTree(this.representedObject, sortComparator);
</ins><span class="cx"> 
</span><span class="cx">         for (let child of this._heapSnapshotDataGridTree.children)
</span><span class="cx">             this._dataGrid.appendChild(child);
</span><span class="lines">@@ -77,23 +75,6 @@
</span><span class="cx">         this._dataGrid.updateLayout();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Public
-
-    get showInternalObjects()
-    {
-        return this._heapSnapshotDataGridTree.includeInternalObjects;
-    }
-
-    set showInternalObjects(showInternalObjects)
-    {
-        if (this.showInternalObjects === showInternalObjects)
-            return;
-
-        this._heapSnapshotDataGridTree.includeInternalObjects = showInternalObjects;
-
-        this._sortDataGrid();
-    }
-
</del><span class="cx">     // Protected
</span><span class="cx"> 
</span><span class="cx">     shown()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesDataGridTreejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotInstancesDataGridTree = class HeapSnapshotInstancesDataGridTree extends WebInspector.Object
</span><span class="cx"> {
</span><del>-    constructor(heapSnapshot, sortComparator, includeInternalObjects)
</del><ins>+    constructor(heapSnapshot, sortComparator)
</ins><span class="cx">     {
</span><span class="cx">         super();
</span><span class="cx"> 
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> 
</span><span class="cx">         this._children = [];
</span><span class="cx">         this._sortComparator = sortComparator;
</span><del>-        this._includeInternalObjects = includeInternalObjects;
</del><span class="cx"> 
</span><span class="cx">         this._visible = false;
</span><span class="cx">         this._popover = null;
</span><span class="lines">@@ -70,22 +69,6 @@
</span><span class="cx"> 
</span><span class="cx">     get heapSnapshot() { return this._heapSnapshot; }
</span><span class="cx"> 
</span><del>-    get includeInternalObjects()
-    {
-        return this._includeInternalObjects;
-    }
-
-    set includeInternalObjects(includeInternal)
-    {
-        if (this._includeInternalObjects === includeInternal)
-            return;
-
-        this._includeInternalObjects = includeInternal;
-
-        this._populateTopLevel();
-        this.sort();
-    }
-
</del><span class="cx">     get visible()
</span><span class="cx">     {
</span><span class="cx">         return this._visible;
</span><span class="lines">@@ -172,12 +155,11 @@
</span><span class="cx">     {
</span><span class="cx">         this.removeChildren();
</span><span class="cx"> 
</span><del>-        // Populate the first level with the different classes.
</del><ins>+        // Populate the first level with the different non-internal classes.
</ins><span class="cx">         for (let [className, {size, retainedSize, count, internalCount}] of this._heapSnapshot.categories) {
</span><del>-            let allInternal = count === internalCount;
-            if (!this._includeInternalObjects &amp;&amp; allInternal)
</del><ins>+            if (count === internalCount)
</ins><span class="cx">                 continue;
</span><del>-            this.appendChild(new WebInspector.HeapSnapshotClassDataGridNode({className, size, retainedSize, count, allInternal}, this));
</del><ins>+            this.appendChild(new WebInspector.HeapSnapshotClassDataGridNode({className, size, retainedSize, count}, this));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.HeapSnapshotSummaryContentView = class HeapSnapshotSummaryContentView extends WebInspector.ContentView
</span><span class="cx"> {
</span><del>-    constructor(heapSnapshot, extraArguments)
</del><ins>+    constructor(heapSnapshot)
</ins><span class="cx">     {
</span><span class="cx">         console.assert(heapSnapshot instanceof WebInspector.HeapSnapshotProxy || heapSnapshot instanceof WebInspector.HeapSnapshotDiffProxy);
</span><span class="cx"> 
</span><span class="lines">@@ -33,9 +33,6 @@
</span><span class="cx"> 
</span><span class="cx">         this._heapSnapshot = heapSnapshot;
</span><span class="cx"> 
</span><del>-        // FIXME: Show/hide internal objects.
-        let {showInternalObjects} = extraArguments;
-
</del><span class="cx">         this.element.classList.add(&quot;heap-snapshot-summary&quot;);
</span><span class="cx"> 
</span><span class="cx">         let contentElement = this.element.appendChild(document.createElement(&quot;div&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceWorkersHeapSnapshotHeapSnapshotjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js (199378 => 199379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js        2016-04-12 18:44:54 UTC (rev 199378)
+++ trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js        2016-04-12 19:35:12 UTC (rev 199379)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> // nodes
</span><del>-// [&lt;0:id&gt;, &lt;1:size&gt;, &lt;2:classNameTableIndex&gt;, &lt;3:internal&gt;];
</del><ins>+// [&lt;0:id&gt;, &lt;1:size&gt;, &lt;2:classNameTableIndex&gt;, &lt;3:internal&gt;]
</ins><span class="cx"> const nodeFieldCount = 4;
</span><span class="cx"> const nodeIdOffset = 0;
</span><span class="cx"> const nodeSizeOffset = 1;
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx">                 instances.push(nodeIndex);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return instances.map(snapshot.serializeNode.bind(snapshot));
</del><ins>+        return instances.map(snapshot.serializeNode, snapshot);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Worker Methods
</span><span class="lines">@@ -269,12 +269,13 @@
</span><span class="cx">                 dominatedNodes.push(nodeOrdinal * nodeFieldCount);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return dominatedNodes.map(this.serializeNode.bind(this));
</del><ins>+        return dominatedNodes.map(this.serializeNode, this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     retainedNodes(nodeIdentifier)
</span><span class="cx">     {
</span><span class="cx">         let retainedNodes = [];
</span><ins>+        let edges = [];
</ins><span class="cx"> 
</span><span class="cx">         let nodeOrdinal = this._nodeIdentifierToOrdinal.get(nodeIdentifier);
</span><span class="cx">         let edgeIndex = this._nodeOrdinalToFirstOutgoingEdge[nodeOrdinal];
</span><span class="lines">@@ -283,9 +284,13 @@
</span><span class="cx">             let toNodeOrdinal = this._nodeIdentifierToOrdinal.get(toNodeIdentifier);
</span><span class="cx">             let toNodeIndex = toNodeOrdinal * nodeFieldCount;
</span><span class="cx">             retainedNodes.push(toNodeIndex);
</span><ins>+            edges.push(edgeIndex);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return retainedNodes.map(this.serializeNode.bind(this));
</del><ins>+        return {
+            retainedNodes: retainedNodes.map(this.serializeNode, this),
+            edges: edges.map(this.serializeEdge, this),
+        };
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     retainers(nodeIdentifier)
</span><span class="lines">@@ -301,7 +306,7 @@
</span><span class="cx">             retainers.push(fromNodeIndex);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return retainers.map(this.serializeNode.bind(this));
</del><ins>+        return retainers.map(this.serializeNode, this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="lines">@@ -321,15 +326,19 @@
</span><span class="cx">     {
</span><span class="cx">         console.assert((nodeIndex % nodeFieldCount) === 0, &quot;Invalid nodeIndex to serialize&quot;);
</span><span class="cx"> 
</span><ins>+        let nodeIdentifier = this._nodes[nodeIndex + nodeIdOffset];
</ins><span class="cx">         let nodeOrdinal = nodeIndex / nodeFieldCount;
</span><ins>+        let edgeIndex = this._nodeOrdinalToFirstOutgoingEdge[nodeOrdinal];
+        let hasChildren = this._edges[edgeIndex + edgeFromIdOffset] === nodeIdentifier;
</ins><span class="cx"> 
</span><span class="cx">         return {
</span><del>-            id: this._nodes[nodeIndex + nodeIdOffset],
</del><ins>+            id: nodeIdentifier,
</ins><span class="cx">             className: this._nodeClassNamesTable[this._nodes[nodeIndex + nodeClassNameOffset]],
</span><span class="cx">             size: this._nodes[nodeIndex + nodeSizeOffset],
</span><span class="cx">             retainedSize: this._nodeOrdinalToRetainedSizes[nodeOrdinal],
</span><span class="cx">             internal: this._nodes[nodeIndex + nodeInternalOffset] ? true : false,
</span><span class="cx">             gcRoot: this._nodeOrdinalIsGCRoot[nodeOrdinal] ? true : false,
</span><ins>+            hasChildren,
</ins><span class="cx">         };
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>