<!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>[197954] trunk/Source</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/197954">197954</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-10 13:37:56 -0800 (Thu, 10 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: JavaScript Heap Allocations Timeline
https://bugs.webkit.org/show_bug.cgi?id=155287
&lt;rdar://problem/25078088&gt;

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype._describe):
(InjectedScript.prototype._nodeDescription):
Provide the nicer node preview more often.

Source/WebInspectorUI:

Initial JavaScript Heap Allocations Timeline includes:

    - Snapshot markers in the timeline
    - Initial/Periodic/End snapshots during recording
    - Ability to manually take a snapshot
    - View of all objects in a Snapshot and Diff between snapshots
      - Summary view - rough display of the size/count of large objects
      - Instances view - view each of the individual objects

* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/Images/Compare.svg: Added.
* UserInterface/Images/HeapSnapshot.svg: Added.
* UserInterface/Images/HeapSnapshotDiff.svg: Added.
* UserInterface/Images/HeapSnapshotInstances.svg: Added.
* UserInterface/Images/HeapSnapshotSummary.svg: Added.
* Localizations/en.lproj/localizedStrings.js:
New resources and strings.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.heapTrackingStarted):
(WebInspector.TimelineManager.prototype.heapTrackingCompleted):
(WebInspector.TimelineManager.prototype.heapSnapshotAdded):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.trackingStart):
(WebInspector.HeapObserver.prototype.trackingComplete):
(WebInspector.HeapObserver):
Add snapshot records to the active recording's timeline.

* UserInterface/Models/HeapAllocationsInstrument.js: Added.
(WebInspector.HeapAllocationsInstrument):
(WebInspector.HeapAllocationsInstrument.supported):
(WebInspector.HeapAllocationsInstrument.prototype.get timelineRecordType):
(WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
(WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
(WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
Start, stop, and periodic snapshots.

* UserInterface/Models/HeapAllocationsTimelineRecord.js:
(WebInspector.HeapAllocationsTimelineRecord):
(WebInspector.HeapAllocationsTimelineRecord.prototype.get timestamp):
(WebInspector.HeapAllocationsTimelineRecord.prototype.get heapSnapshot):
* UserInterface/Models/TimelineRecord.js:
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.addRecord):
* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.createForTimeline):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
(WebInspector.TimelineTabContentView.genericClassNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForRecord):
(WebInspector.TimelineTabContentView.displayNameForRecord):
New timeline and record type.

* UserInterface/Models/HeapSnapshotDiff.js: Added.
(WebInspector.HeapSnapshotDiff):
(WebInspector.HeapSnapshotDiff.prototype.get snapshot1):
(WebInspector.HeapSnapshotDiff.prototype.get snapshot2):
(WebInspector.HeapSnapshotDiff.prototype.get addedInstances):
(WebInspector.HeapSnapshotDiff.prototype.get removedInstances):
(WebInspector.HeapSnapshotDiff.prototype.get sizeDifference):
(WebInspector.HeapSnapshotDiff.prototype.get growth):
(WebInspector.HeapSnapshotDiff.prototype.snapshotForDiff):
Compare two snapshots and create a &quot;diff snapshot&quot; which is just
the newly added objects.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
A HeapSnapshot creates a HeapSnapshotClusterView.

* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: Added.
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get record):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get data):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.markAsBaseline):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.clearBaseline):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
(.timeline-overview-graph.heap-allocations):
(.timeline-overview-graph.heap-allocations &gt; img.snapshot):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: Added.
(WebInspector.HeapAllocationsTimelineOverviewGraph):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.reset):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout.xScale):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords):
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._heapAllocationTimelineRecordAdded):
* UserInterface/Views/HeapAllocationsTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
(.timeline-view.heap-allocations &gt; .data-grid):
(.timeline-view.heap-allocations &gt; .data-grid td .icon.heap-snapshot):
(.timeline-view.heap-allocations &gt; .data-grid tr.baseline):
(.timeline-view.heap-allocations &gt; .content-view-container):
(.timeline-view.heap-allocations &gt; .content-view-container &gt; .content-view):
* UserInterface/Views/HeapAllocationsTimelineView.js: Added.
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationItems):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.HeapAllocationsTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype.reset):
(WebInspector.HeapAllocationsTimelineView.prototype._heapAllocationsTimelineRecordAdded):
(WebInspector.HeapAllocationsTimelineView.prototype._snapshotListPathComponentClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._snapshotPathComponentSelected):
(WebInspector.HeapAllocationsTimelineView.prototype._currentContentViewDidChange):
(WebInspector.HeapAllocationsTimelineView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
(WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._cancelSelectComparisonHeapSnapshots):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/HeapSnapshotClassDataGridNode.js: Added.
(WebInspector.HeapSnapshotClassDataGridNode):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.get data):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotClassDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedSort):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedChildren):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._removeFetchMoreDataGridNode):
(WebInspector.HeapSnapshotClassDataGridNode.prototype._appendFetchMoreDataGridNode):
* UserInterface/Views/HeapSnapshotClusterContentView.js: Added.
(WebInspector.HeapSnapshotClusterContentView.createPathComponent):
(WebInspector.HeapSnapshotClusterContentView):
(WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
(WebInspector.HeapSnapshotClusterContentView.prototype.get heapSnapshot):
(WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems):
(WebInspector.HeapSnapshotClusterContentView.prototype.get selectionPathComponents):
(WebInspector.HeapSnapshotClusterContentView.prototype.shown):
(WebInspector.HeapSnapshotClusterContentView.prototype.closed):
(WebInspector.HeapSnapshotClusterContentView.prototype.saveToCookie):
(WebInspector.HeapSnapshotClusterContentView.prototype.restoreFromCookie):
(WebInspector.HeapSnapshotClusterContentView.prototype.showSummary):
(WebInspector.HeapSnapshotClusterContentView.prototype.showInstances):
(WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments):
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
(WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
(WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentSelected):
(WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting):
(WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue):
(WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: Added.
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get data):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCells):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler.):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler):
* UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js: Added.
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode):
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.sort):
* UserInterface/Views/HeapSnapshotInstancesContentView.css: Added.
* UserInterface/Views/HeapSnapshotInstancesContentView.js: Added.
(WebInspector.HeapSnapshotInstancesContentView):
(WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects):
(WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects):
(WebInspector.HeapSnapshotInstancesContentView.prototype._sortDataGrid):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js: Added.
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get heapSnapshot):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get children):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.appendChild):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.insertChild):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeChildren):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set sortComparator):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.sort):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
* UserInterface/Views/HeapSnapshotSummaryContentView.css: Added.
* UserInterface/Views/HeapSnapshotSummaryContentView.js: Added.
(WebInspector.HeapSnapshotSummaryContentView.createChartContainer):
(WebInspector.HeapSnapshotSummaryContentView.appendLegendRow):
(WebInspector.HeapSnapshotSummaryContentView.appendEmptyMessage):
(WebInspector.HeapSnapshotSummaryContentView):
(WebInspector.HeapSnapshotSummaryContentView.prototype.layout):
* UserInterface/Views/PathComponentIcons.css:
(.heap-snapshot-summary-icon .icon):
(.heap-snapshot-instances-icon .icon):
(.snapshot-list-icon .icon):
(.snapshot-diff-icon .icon):
(body:not(.mac-platform, .windows-platform) .snapshot-diff-icon .icon):
(body:not(.mac-platform, .windows-platform) .call-trees-icon .icon): Deleted.
* UserInterface/Views/TextNavigationItem.css:
(.navigation-bar .item.text):
* UserInterface/Views/TextNavigationItem.js:
(WebInspector.TextNavigationItem):
(WebInspector.TextNavigationItem.prototype.get text):
(WebInspector.TextNavigationItem.prototype.set text):
* UserInterface/Views/TimelineIcons.css:
(.heap-snapshot-record .icon):
* UserInterface/Views/Variables.css:
(:root):
New views.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNodePreview):
(WebInspector.FormattedValue.createElementForFunctionWithName):
(WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview):
Better display for a raw object preview.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.userSelectedRecord):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord):
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype._handleClick):
(WebInspector.TimelineRuler.prototype._handleMouseDown):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.userSelectedRecordFromOverview):
Hook up a way for clicking in the TimelineOverview / TimelineRuler
to redispatch to an OverviewGraph element, and provide a patch for
the Overview -&gt; RecordingContentView -&gt; TimelineView for records.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs">trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js</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="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordjs">trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecord.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordingjs">trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTesthtml">trunk/Source/WebInspectorUI/UserInterface/Test.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuejs">trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsPathComponentIconscss">trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineIconscss">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineIcons.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRulerjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVariablescss">trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesComparesvg">trunk/Source/WebInspectorUI/UserInterface/Images/Compare.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotsvg">trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshot.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotDiffsvg">trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotDiff.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotInstancessvg">trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotInstances.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotSummarysvg">trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotSummary.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsHeapAllocationsInstrumentjs">trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsHeapAllocationsTimelineRecordjs">trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsTimelineRecord.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsHeapSnapshotDiffjs">trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotDiff.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineOverviewGraphcss">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.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="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstanceFetchMoreDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css</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="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTextNavigationItemcss">trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTextNavigationItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-03-09  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: JavaScript Heap Allocations Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=155287
+        &lt;rdar://problem/25078088&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/InjectedScriptSource.js:
+        (InjectedScript.prototype._describe):
+        (InjectedScript.prototype._nodeDescription):
+        Provide the nicer node preview more often.
+
</ins><span class="cx"> 2016-03-10  Saam barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Assignment to new.target should be an early error
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -803,27 +803,6 @@
</span><span class="cx">         return null;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    _nodeDescription: function(node)
-    {
-        var isXMLDocument = node.ownerDocument &amp;&amp; !!node.ownerDocument.xmlVersion;
-        var description = isXMLDocument ? node.nodeName : node.nodeName.toLowerCase();
-
-        switch (node.nodeType) {
-        case 1: // Node.ELEMENT_NODE
-            if (node.id)
-                description += &quot;#&quot; + node.id;
-            if (node.hasAttribute(&quot;class&quot;)) {
-                // Using .getAttribute() is a workaround for SVG*Element.className returning SVGAnimatedString,
-                // which doesn't have any useful String methods. See &lt;https://webkit.org/b/145363/&gt;.
-                description += &quot;.&quot; + node.getAttribute(&quot;class&quot;).trim().replace(/\s+/g, &quot;.&quot;);
-            }
-            return description;
-
-        default:
-            return description;
-        }
-    },
-
</del><span class="cx">     _classPreview: function(classConstructorValue)
</span><span class="cx">     {
</span><span class="cx">         return &quot;class &quot; + classConstructorValue.name;
</span><span class="lines">@@ -878,7 +857,7 @@
</span><span class="cx">             return toString(obj);
</span><span class="cx"> 
</span><span class="cx">         if (subtype === &quot;node&quot;)
</span><del>-            return this._nodeDescription(obj);
</del><ins>+            return this._nodePreview(obj);
</ins><span class="cx"> 
</span><span class="cx">         var className = InjectedScriptHost.internalConstructorName(obj);
</span><span class="cx">         if (subtype === &quot;array&quot;)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -1,3 +1,245 @@
</span><ins>+2016-03-09  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: JavaScript Heap Allocations Timeline
+        https://bugs.webkit.org/show_bug.cgi?id=155287
+        &lt;rdar://problem/25078088&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        Initial JavaScript Heap Allocations Timeline includes:
+
+            - Snapshot markers in the timeline
+            - Initial/Periodic/End snapshots during recording
+            - Ability to manually take a snapshot
+            - View of all objects in a Snapshot and Diff between snapshots
+              - Summary view - rough display of the size/count of large objects
+              - Instances view - view each of the individual objects
+
+        * UserInterface/Main.html:
+        * UserInterface/Test.html:
+        * UserInterface/Images/Compare.svg: Added.
+        * UserInterface/Images/HeapSnapshot.svg: Added.
+        * UserInterface/Images/HeapSnapshotDiff.svg: Added.
+        * UserInterface/Images/HeapSnapshotInstances.svg: Added.
+        * UserInterface/Images/HeapSnapshotSummary.svg: Added.
+        * Localizations/en.lproj/localizedStrings.js:
+        New resources and strings.
+
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype.heapTrackingStarted):
+        (WebInspector.TimelineManager.prototype.heapTrackingCompleted):
+        (WebInspector.TimelineManager.prototype.heapSnapshotAdded):
+        * UserInterface/Protocol/HeapObserver.js:
+        (WebInspector.HeapObserver.prototype.trackingStart):
+        (WebInspector.HeapObserver.prototype.trackingComplete):
+        (WebInspector.HeapObserver):
+        Add snapshot records to the active recording's timeline.
+
+        * UserInterface/Models/HeapAllocationsInstrument.js: Added.
+        (WebInspector.HeapAllocationsInstrument):
+        (WebInspector.HeapAllocationsInstrument.supported):
+        (WebInspector.HeapAllocationsInstrument.prototype.get timelineRecordType):
+        (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
+        (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
+        (WebInspector.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
+        Start, stop, and periodic snapshots.
+
+        * UserInterface/Models/HeapAllocationsTimelineRecord.js:
+        (WebInspector.HeapAllocationsTimelineRecord):
+        (WebInspector.HeapAllocationsTimelineRecord.prototype.get timestamp):
+        (WebInspector.HeapAllocationsTimelineRecord.prototype.get heapSnapshot):
+        * UserInterface/Models/TimelineRecord.js:
+        * UserInterface/Models/TimelineRecording.js:
+        (WebInspector.TimelineRecording):
+        (WebInspector.TimelineRecording.prototype.addRecord):
+        * UserInterface/Views/TimelineOverviewGraph.js:
+        (WebInspector.TimelineOverviewGraph.createForTimeline):
+        * UserInterface/Views/TimelineTabContentView.js:
+        (WebInspector.TimelineTabContentView.displayNameForTimeline):
+        (WebInspector.TimelineTabContentView.iconClassNameForTimeline):
+        (WebInspector.TimelineTabContentView.genericClassNameForTimeline):
+        (WebInspector.TimelineTabContentView.iconClassNameForRecord):
+        (WebInspector.TimelineTabContentView.displayNameForRecord):
+        New timeline and record type.
+
+        * UserInterface/Models/HeapSnapshotDiff.js: Added.
+        (WebInspector.HeapSnapshotDiff):
+        (WebInspector.HeapSnapshotDiff.prototype.get snapshot1):
+        (WebInspector.HeapSnapshotDiff.prototype.get snapshot2):
+        (WebInspector.HeapSnapshotDiff.prototype.get addedInstances):
+        (WebInspector.HeapSnapshotDiff.prototype.get removedInstances):
+        (WebInspector.HeapSnapshotDiff.prototype.get sizeDifference):
+        (WebInspector.HeapSnapshotDiff.prototype.get growth):
+        (WebInspector.HeapSnapshotDiff.prototype.snapshotForDiff):
+        Compare two snapshots and create a &quot;diff snapshot&quot; which is just
+        the newly added objects.
+
+        * UserInterface/Views/ContentView.js:
+        (WebInspector.ContentView.createFromRepresentedObject):
+        (WebInspector.ContentView.isViewable):
+        A HeapSnapshot creates a HeapSnapshotClusterView.
+
+        * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js: Added.
+        (WebInspector.HeapAllocationsTimelineDataGridNode):
+        (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get record):
+        (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.get data):
+        (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.markAsBaseline):
+        (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.clearBaseline):
+        * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
+        (.timeline-overview-graph.heap-allocations):
+        (.timeline-overview-graph.heap-allocations &gt; img.snapshot):
+        * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js: Added.
+        (WebInspector.HeapAllocationsTimelineOverviewGraph):
+        (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.reset):
+        (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout.xScale):
+        (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
+        (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords):
+        (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._heapAllocationTimelineRecordAdded):
+        * UserInterface/Views/HeapAllocationsTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js.
+        (.timeline-view.heap-allocations &gt; .data-grid):
+        (.timeline-view.heap-allocations &gt; .data-grid td .icon.heap-snapshot):
+        (.timeline-view.heap-allocations &gt; .data-grid tr.baseline):
+        (.timeline-view.heap-allocations &gt; .content-view-container):
+        (.timeline-view.heap-allocations &gt; .content-view-container &gt; .content-view):
+        * UserInterface/Views/HeapAllocationsTimelineView.js: Added.
+        (WebInspector.HeapAllocationsTimelineView):
+        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
+        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
+        (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
+        (WebInspector.HeapAllocationsTimelineView.prototype.get navigationItems):
+        (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
+        (WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
+        (WebInspector.HeapAllocationsTimelineView.prototype.treeElementPathComponentSelected):
+        (WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview):
+        (WebInspector.HeapAllocationsTimelineView.prototype.closed):
+        (WebInspector.HeapAllocationsTimelineView.prototype.layout):
+        (WebInspector.HeapAllocationsTimelineView.prototype.reset):
+        (WebInspector.HeapAllocationsTimelineView.prototype._heapAllocationsTimelineRecordAdded):
+        (WebInspector.HeapAllocationsTimelineView.prototype._snapshotListPathComponentClicked):
+        (WebInspector.HeapAllocationsTimelineView.prototype._snapshotPathComponentSelected):
+        (WebInspector.HeapAllocationsTimelineView.prototype._currentContentViewDidChange):
+        (WebInspector.HeapAllocationsTimelineView.prototype._contentViewSelectionPathComponentDidChange):
+        (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
+        (WebInspector.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
+        (WebInspector.HeapAllocationsTimelineView.prototype._cancelSelectComparisonHeapSnapshots):
+        (WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
+        (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
+        * UserInterface/Views/HeapSnapshotClassDataGridNode.js: Added.
+        (WebInspector.HeapSnapshotClassDataGridNode):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype.get data):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype.sort):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._fetchBatch):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedSort):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._updateBatchedChildren):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._removeFetchMoreDataGridNode):
+        (WebInspector.HeapSnapshotClassDataGridNode.prototype._appendFetchMoreDataGridNode):
+        * UserInterface/Views/HeapSnapshotClusterContentView.js: Added.
+        (WebInspector.HeapSnapshotClusterContentView.createPathComponent):
+        (WebInspector.HeapSnapshotClusterContentView):
+        (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get heapSnapshot):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.get selectionPathComponents):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.shown):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.closed):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.saveToCookie):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.restoreFromCookie):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.showSummary):
+        (WebInspector.HeapSnapshotClusterContentView.prototype.showInstances):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentSelected):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue):
+        (WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem):
+        * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: Added.
+        (WebInspector.HeapSnapshotInstanceDataGridNode):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get data):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCells):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler.):
+        (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._contextMenuHandler):
+        * UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js: Added.
+        (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode):
+        (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.createCellContent):
+        (WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode.prototype.sort):
+        * UserInterface/Views/HeapSnapshotInstancesContentView.css: Added.
+        * UserInterface/Views/HeapSnapshotInstancesContentView.js: Added.
+        (WebInspector.HeapSnapshotInstancesContentView):
+        (WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects):
+        (WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects):
+        (WebInspector.HeapSnapshotInstancesContentView.prototype._sortDataGrid):
+        * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js: Added.
+        (WebInspector.HeapSnapshotInstancesDataGridTree):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get heapSnapshot):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get children):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.appendChild):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.insertChild):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.removeChildren):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set sortComparator):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.sort):
+        (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
+        * UserInterface/Views/HeapSnapshotSummaryContentView.css: Added.
+        * UserInterface/Views/HeapSnapshotSummaryContentView.js: Added.
+        (WebInspector.HeapSnapshotSummaryContentView.createChartContainer):
+        (WebInspector.HeapSnapshotSummaryContentView.appendLegendRow):
+        (WebInspector.HeapSnapshotSummaryContentView.appendEmptyMessage):
+        (WebInspector.HeapSnapshotSummaryContentView):
+        (WebInspector.HeapSnapshotSummaryContentView.prototype.layout):
+        * UserInterface/Views/PathComponentIcons.css:
+        (.heap-snapshot-summary-icon .icon):
+        (.heap-snapshot-instances-icon .icon):
+        (.snapshot-list-icon .icon):
+        (.snapshot-diff-icon .icon):
+        (body:not(.mac-platform, .windows-platform) .snapshot-diff-icon .icon):
+        (body:not(.mac-platform, .windows-platform) .call-trees-icon .icon): Deleted.
+        * UserInterface/Views/TextNavigationItem.css:
+        (.navigation-bar .item.text):
+        * UserInterface/Views/TextNavigationItem.js:
+        (WebInspector.TextNavigationItem):
+        (WebInspector.TextNavigationItem.prototype.get text):
+        (WebInspector.TextNavigationItem.prototype.set text):
+        * UserInterface/Views/TimelineIcons.css:
+        (.heap-snapshot-record .icon):
+        * UserInterface/Views/Variables.css:
+        (:root):
+        New views.
+
+        * UserInterface/Views/FormattedValue.js:
+        (WebInspector.FormattedValue.createElementForNodePreview):
+        (WebInspector.FormattedValue.createElementForFunctionWithName):
+        (WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview):
+        Better display for a raw object preview.
+
+        * UserInterface/Views/TimelineOverview.js:
+        (WebInspector.TimelineOverview):
+        (WebInspector.TimelineOverview.prototype.userSelectedRecord):
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView):
+        (WebInspector.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord):
+        * UserInterface/Views/TimelineRuler.js:
+        (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
+        (WebInspector.TimelineRuler.prototype._handleClick):
+        (WebInspector.TimelineRuler.prototype._handleMouseDown):
+        (WebInspector.TimelineRuler.prototype._handleMouseMove):
+        * UserInterface/Views/TimelineView.js:
+        (WebInspector.TimelineView.prototype.userSelectedRecordFromOverview):
+        Hook up a way for clicking in the TimelineOverview / TimelineRuler
+        to redispatch to an OverviewGraph element, and provide a patch for
+        the Overview -&gt; RecordingContentView -&gt; TimelineView for records.
+
</ins><span class="cx"> 2016-03-09  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: LayoutTimelineView path components should reflect grid row nesting
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -68,6 +68,7 @@
</span><span class="cx"> localizedStrings[&quot;All Resources&quot;] = &quot;All Resources&quot;;
</span><span class="cx"> localizedStrings[&quot;All Storage&quot;] = &quot;All Storage&quot;;
</span><span class="cx"> localizedStrings[&quot;All Uncaught Exceptions&quot;] = &quot;All Uncaught Exceptions&quot;;
</span><ins>+localizedStrings[&quot;Allocation Size Breakdown&quot;] = &quot;Allocation Size Breakdown&quot;;
</ins><span class="cx"> localizedStrings[&quot;Alternates&quot;] = &quot;Alternates&quot;;
</span><span class="cx"> localizedStrings[&quot;An error occurred trying to load the resource.&quot;] = &quot;An error occurred trying to load the resource.&quot;;
</span><span class="cx"> localizedStrings[&quot;An error occurred trying to read the  %s  table.&quot;] = &quot;An error occurred trying to read the  %s  table.&quot;;
</span><span class="lines">@@ -96,6 +97,7 @@
</span><span class="cx"> localizedStrings[&quot;Author Stylesheet&quot;] = &quot;Author Stylesheet&quot;;
</span><span class="cx"> localizedStrings[&quot;Automatically continue after evaluating&quot;] = &quot;Automatically continue after evaluating&quot;;
</span><span class="cx"> localizedStrings[&quot;Average Time&quot;] = &quot;Average Time&quot;;
</span><ins>+localizedStrings[&quot;Average allocation size&quot;] = &quot;Average allocation size&quot;;
</ins><span class="cx"> localizedStrings[&quot;Back (%s)&quot;] = &quot;Back (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Background&quot;] = &quot;Background&quot;;
</span><span class="cx"> localizedStrings[&quot;Basis&quot;] = &quot;Basis&quot;;
</span><span class="lines">@@ -110,7 +112,10 @@
</span><span class="cx"> localizedStrings[&quot;Box Model&quot;] = &quot;Box Model&quot;;
</span><span class="cx"> localizedStrings[&quot;Box Shadow&quot;] = &quot;Box Shadow&quot;;
</span><span class="cx"> localizedStrings[&quot;Breakdown&quot;] = &quot;Breakdown&quot;;
</span><ins>+localizedStrings[&quot;Breakdown of allocations into size classes&quot;] = &quot;Breakdown of allocations into size classes&quot;;
</ins><span class="cx"> localizedStrings[&quot;Breakdown of each memory category at the end of the selected time range&quot;] = &quot;Breakdown of each memory category at the end of the selected time range&quot;;
</span><ins>+localizedStrings[&quot;Breakdown of object counts by class&quot;] = &quot;Breakdown of object counts by class&quot;;
+localizedStrings[&quot;Breakdown of total allocation size by class&quot;] = &quot;Breakdown of total allocation size by class&quot;;
</ins><span class="cx"> localizedStrings[&quot;Bubbling&quot;] = &quot;Bubbling&quot;;
</span><span class="cx"> localizedStrings[&quot;Busy&quot;] = &quot;Busy&quot;;
</span><span class="cx"> localizedStrings[&quot;Cached&quot;] = &quot;Cached&quot;;
</span><span class="lines">@@ -118,6 +123,7 @@
</span><span class="cx"> localizedStrings[&quot;Call Trees&quot;] = &quot;Call Trees&quot;;
</span><span class="cx"> localizedStrings[&quot;Calls&quot;] = &quot;Calls&quot;;
</span><span class="cx"> localizedStrings[&quot;Cancel Automatic Continue&quot;] = &quot;Cancel Automatic Continue&quot;;
</span><ins>+localizedStrings[&quot;Cancel comparison&quot;] = &quot;Cancel comparison&quot;;
</ins><span class="cx"> localizedStrings[&quot;Caps&quot;] = &quot;Caps&quot;;
</span><span class="cx"> localizedStrings[&quot;Capturing&quot;] = &quot;Capturing&quot;;
</span><span class="cx"> localizedStrings[&quot;Catch Variables&quot;] = &quot;Catch Variables&quot;;
</span><span class="lines">@@ -127,6 +133,9 @@
</span><span class="cx"> localizedStrings[&quot;Checked&quot;] = &quot;Checked&quot;;
</span><span class="cx"> localizedStrings[&quot;Child Layers&quot;] = &quot;Child Layers&quot;;
</span><span class="cx"> localizedStrings[&quot;Children&quot;] = &quot;Children&quot;;
</span><ins>+localizedStrings[&quot;Class Count Breakdown&quot;] = &quot;Class Count Breakdown&quot;;
+localizedStrings[&quot;Class Name&quot;] = &quot;Class Name&quot;;
+localizedStrings[&quot;Class Size Breakdown&quot;] = &quot;Class Size Breakdown&quot;;
</ins><span class="cx"> localizedStrings[&quot;Classes&quot;] = &quot;Classes&quot;;
</span><span class="cx"> localizedStrings[&quot;Clear&quot;] = &quot;Clear&quot;;
</span><span class="cx"> localizedStrings[&quot;Clear Log&quot;] = &quot;Clear Log&quot;;
</span><span class="lines">@@ -164,6 +173,7 @@
</span><span class="cx"> localizedStrings[&quot;Color&quot;] = &quot;Color&quot;;
</span><span class="cx"> localizedStrings[&quot;Comment&quot;] = &quot;Comment&quot;;
</span><span class="cx"> localizedStrings[&quot;Comment All Properties&quot;] = &quot;Comment All Properties&quot;;
</span><ins>+localizedStrings[&quot;Compare snapshots&quot;] = &quot;Compare snapshots&quot;;
</ins><span class="cx"> localizedStrings[&quot;Comparison of total memory size at the end of the selected time range to the maximum memory size in this recording&quot;] = &quot;Comparison of total memory size at the end of the selected time range to the maximum memory size in this recording&quot;;
</span><span class="cx"> localizedStrings[&quot;Composite&quot;] = &quot;Composite&quot;;
</span><span class="cx"> localizedStrings[&quot;Compressed&quot;] = &quot;Compressed&quot;;
</span><span class="lines">@@ -189,6 +199,7 @@
</span><span class="cx"> localizedStrings[&quot;Copy Table&quot;] = &quot;Copy Table&quot;;
</span><span class="cx"> localizedStrings[&quot;Copy as HTML&quot;] = &quot;Copy as HTML&quot;;
</span><span class="cx"> localizedStrings[&quot;Could not fetch properties. Object may no longer exist.&quot;] = &quot;Could not fetch properties. Object may no longer exist.&quot;;
</span><ins>+localizedStrings[&quot;Count&quot;] = &quot;Count&quot;;
</ins><span class="cx"> localizedStrings[&quot;Create %s Rule&quot;] = &quot;Create %s Rule&quot;;
</span><span class="cx"> localizedStrings[&quot;Create a new tab&quot;] = &quot;Create a new tab&quot;;
</span><span class="cx"> localizedStrings[&quot;Current&quot;] = &quot;Current&quot;;
</span><span class="lines">@@ -362,9 +373,11 @@
</span><span class="cx"> localizedStrings[&quot;Grow&quot;] = &quot;Grow&quot;;
</span><span class="cx"> localizedStrings[&quot;HTML Attributes&quot;] = &quot;HTML Attributes&quot;;
</span><span class="cx"> localizedStrings[&quot;HTTP&quot;] = &quot;HTTP&quot;;
</span><ins>+localizedStrings[&quot;Heap Snapshot Object (@%d)&quot;] = &quot;Heap Snapshot Object (@%d)&quot;;
</ins><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><ins>+localizedStrings[&quot;Hide internal objects&quot;] = &quot;Hide internal objects&quot;;
</ins><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">@@ -393,15 +406,19 @@
</span><span class="cx"> localizedStrings[&quot;Initiator&quot;] = &quot;Initiator&quot;;
</span><span class="cx"> localizedStrings[&quot;Input: &quot;] = &quot;Input: &quot;;
</span><span class="cx"> localizedStrings[&quot;Inset&quot;] = &quot;Inset&quot;;
</span><ins>+localizedStrings[&quot;Instances&quot;] = &quot;Instances&quot;;
+localizedStrings[&quot;Internal object&quot;] = &quot;Internal object&quot;;
</ins><span class="cx"> localizedStrings[&quot;Invalid&quot;] = &quot;Invalid&quot;;
</span><span class="cx"> localizedStrings[&quot;Invoke getter&quot;] = &quot;Invoke getter&quot;;
</span><span class="cx"> localizedStrings[&quot;Iterations&quot;] = &quot;Iterations&quot;;
</span><span class="cx"> localizedStrings[&quot;JavaScript&quot;] = &quot;JavaScript&quot;;
</span><span class="cx"> localizedStrings[&quot;JavaScript &amp; Events&quot;] = &quot;JavaScript &amp; Events&quot;;
</span><ins>+localizedStrings[&quot;JavaScript Allocations&quot;] = &quot;JavaScript Allocations&quot;;
</ins><span class="cx"> localizedStrings[&quot;Jump to Definition&quot;] = &quot;Jump to Definition&quot;;
</span><span class="cx"> localizedStrings[&quot;Keep Log on Navigation&quot;] = &quot;Keep Log on Navigation&quot;;
</span><span class="cx"> localizedStrings[&quot;Key&quot;] = &quot;Key&quot;;
</span><span class="cx"> localizedStrings[&quot;Label&quot;] = &quot;Label&quot;;
</span><ins>+localizedStrings[&quot;Large %s&quot;] = &quot;Large %s&quot;;
</ins><span class="cx"> localizedStrings[&quot;Latency&quot;] = &quot;Latency&quot;;
</span><span class="cx"> localizedStrings[&quot;Layer&quot;] = &quot;Layer&quot;;
</span><span class="cx"> localizedStrings[&quot;Layer Count: %d&quot;] = &quot;Layer Count: %d&quot;;
</span><span class="lines">@@ -442,6 +459,7 @@
</span><span class="cx"> localizedStrings[&quot;Maximum Size: %s&quot;] = &quot;Maximum Size: %s&quot;;
</span><span class="cx"> localizedStrings[&quot;Maximum maximum memory size in this recording&quot;] = &quot;Maximum maximum memory size in this recording&quot;;
</span><span class="cx"> localizedStrings[&quot;Media: &quot;] = &quot;Media: &quot;;
</span><ins>+localizedStrings[&quot;Medium %s&quot;] = &quot;Medium %s&quot;;
</ins><span class="cx"> localizedStrings[&quot;Memory&quot;] = &quot;Memory&quot;;
</span><span class="cx"> localizedStrings[&quot;Memory: %s&quot;] = &quot;Memory: %s&quot;;
</span><span class="cx"> localizedStrings[&quot;Message&quot;] = &quot;Message&quot;;
</span><span class="lines">@@ -481,6 +499,8 @@
</span><span class="cx"> localizedStrings[&quot;No Watch Expressions&quot;] = &quot;No Watch Expressions&quot;;
</span><span class="cx"> localizedStrings[&quot;No exact ARIA role match.&quot;] = &quot;No exact ARIA role match.&quot;;
</span><span class="cx"> localizedStrings[&quot;No message&quot;] = &quot;No message&quot;;
</span><ins>+localizedStrings[&quot;No objects&quot;] = &quot;No objects&quot;;
+localizedStrings[&quot;No preview available&quot;] = &quot;No preview available&quot;;
</ins><span class="cx"> localizedStrings[&quot;No properties.&quot;] = &quot;No properties.&quot;;
</span><span class="cx"> localizedStrings[&quot;Node&quot;] = &quot;Node&quot;;
</span><span class="cx"> localizedStrings[&quot;Not found&quot;] = &quot;Not found&quot;;
</span><span class="lines">@@ -591,6 +611,8 @@
</span><span class="cx"> localizedStrings[&quot;Secure&quot;] = &quot;Secure&quot;;
</span><span class="cx"> localizedStrings[&quot;Security Issue&quot;] = &quot;Security Issue&quot;;
</span><span class="cx"> localizedStrings[&quot;Select %s Rule&quot;] = &quot;Select %s Rule&quot;;
</span><ins>+localizedStrings[&quot;Select baseline snapshot&quot;] = &quot;Select baseline snapshot&quot;;
+localizedStrings[&quot;Select comparison snapshot&quot;] = &quot;Select comparison snapshot&quot;;
</ins><span class="cx"> localizedStrings[&quot;Selected&quot;] = &quot;Selected&quot;;
</span><span class="cx"> localizedStrings[&quot;Selected Element&quot;] = &quot;Selected Element&quot;;
</span><span class="cx"> localizedStrings[&quot;Selected Frames&quot;] = &quot;Selected Frames&quot;;
</span><span class="lines">@@ -609,12 +631,15 @@
</span><span class="cx"> localizedStrings[&quot;Shadow&quot;] = &quot;Shadow&quot;;
</span><span class="cx"> localizedStrings[&quot;Shadow Content&quot;] = &quot;Shadow Content&quot;;
</span><span class="cx"> localizedStrings[&quot;Shared Focus&quot;] = &quot;Shared Focus&quot;;
</span><ins>+localizedStrings[&quot;Show %d More&quot;] = &quot;Show %d More&quot;;
</ins><span class="cx"> localizedStrings[&quot;Show All&quot;] = &quot;Show All&quot;;
</span><span class="cx"> localizedStrings[&quot;Show All Nodes (%d More)&quot;] = &quot;Show All Nodes (%d More)&quot;;
</span><ins>+localizedStrings[&quot;Show Remaining (%d)&quot;] = &quot;Show Remaining (%d)&quot;;
</ins><span class="cx"> localizedStrings[&quot;Show Replay Controls&quot;] = &quot;Show Replay Controls&quot;;
</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><ins>+localizedStrings[&quot;Show internal objects&quot;] = &quot;Show internal objects&quot;;
</ins><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 class="lines">@@ -625,7 +650,12 @@
</span><span class="cx"> localizedStrings[&quot;Size&quot;] = &quot;Size&quot;;
</span><span class="cx"> localizedStrings[&quot;Sizing&quot;] = &quot;Sizing&quot;;
</span><span class="cx"> localizedStrings[&quot;Slice&quot;] = &quot;Slice&quot;;
</span><ins>+localizedStrings[&quot;Small %s&quot;] = &quot;Small %s&quot;;
</ins><span class="cx"> localizedStrings[&quot;Small Icons&quot;] = &quot;Small Icons&quot;;
</span><ins>+localizedStrings[&quot;Snapshot %d&quot;] = &quot;Snapshot %d&quot;;
+localizedStrings[&quot;Snapshot Comparison (%d and %d)&quot;] = &quot;Snapshot Comparison (%d and %d)&quot;;
+localizedStrings[&quot;Snapshot List&quot;] = &quot;Snapshot List&quot;;
+localizedStrings[&quot;Snapshots&quot;] = &quot;Snapshots&quot;;
</ins><span class="cx"> localizedStrings[&quot;Socket&quot;] = &quot;Socket&quot;;
</span><span class="cx"> localizedStrings[&quot;Sockets&quot;] = &quot;Sockets&quot;;
</span><span class="cx"> localizedStrings[&quot;Sort Ascending&quot;] = &quot;Sort Ascending&quot;;
</span><span class="lines">@@ -659,6 +689,8 @@
</span><span class="cx"> localizedStrings[&quot;Styles \u2014 Visual&quot;] = &quot;Styles \u2014 Visual&quot;;
</span><span class="cx"> localizedStrings[&quot;Stylesheet&quot;] = &quot;Stylesheet&quot;;
</span><span class="cx"> localizedStrings[&quot;Stylesheets&quot;] = &quot;Stylesheets&quot;;
</span><ins>+localizedStrings[&quot;Summary&quot;] = &quot;Summary&quot;;
+localizedStrings[&quot;Take snapshot&quot;] = &quot;Take snapshot&quot;;
</ins><span class="cx"> localizedStrings[&quot;Text&quot;] = &quot;Text&quot;;
</span><span class="cx"> localizedStrings[&quot;Text Node&quot;] = &quot;Text Node&quot;;
</span><span class="cx"> localizedStrings[&quot;Text Only&quot;] = &quot;Text Only&quot;;
</span><span class="lines">@@ -688,10 +720,13 @@
</span><span class="cx"> localizedStrings[&quot;Toggle Classes&quot;] = &quot;Toggle Classes&quot;;
</span><span class="cx"> localizedStrings[&quot;Top&quot;] = &quot;Top&quot;;
</span><span class="cx"> localizedStrings[&quot;Top Down&quot;] = &quot;Top Down&quot;;
</span><ins>+localizedStrings[&quot;Total Size&quot;] = &quot;Total Size&quot;;
</ins><span class="cx"> localizedStrings[&quot;Total Time&quot;] = &quot;Total Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Total memory size at the end of the selected time range&quot;] = &quot;Total memory size at the end of the selected time range&quot;;
</span><span class="cx"> localizedStrings[&quot;Total number of resources, click to show the Resources tab&quot;] = &quot;Total number of resources, click to show the Resources tab&quot;;
</span><ins>+localizedStrings[&quot;Total object count&quot;] = &quot;Total object count&quot;;
</ins><span class="cx"> localizedStrings[&quot;Total size of all resources, click to show the Network Requests timeline&quot;] = &quot;Total size of all resources, click to show the Network Requests timeline&quot;;
</span><ins>+localizedStrings[&quot;Total size of heap&quot;] = &quot;Total size of heap&quot;;
</ins><span class="cx"> localizedStrings[&quot;Trace&quot;] = &quot;Trace&quot;;
</span><span class="cx"> localizedStrings[&quot;Trace: %s&quot;] = &quot;Trace: %s&quot;;
</span><span class="cx"> localizedStrings[&quot;Transferred&quot;] = &quot;Transferred&quot;;
</span><span class="lines">@@ -714,6 +749,7 @@
</span><span class="cx"> localizedStrings[&quot;Value&quot;] = &quot;Value&quot;;
</span><span class="cx"> localizedStrings[&quot;Variants&quot;] = &quot;Variants&quot;;
</span><span class="cx"> localizedStrings[&quot;Vertical&quot;] = &quot;Vertical&quot;;
</span><ins>+localizedStrings[&quot;Very Large&quot;] = &quot;Very Large&quot;;
</ins><span class="cx"> localizedStrings[&quot;Visibility&quot;] = &quot;Visibility&quot;;
</span><span class="cx"> localizedStrings[&quot;Warning: &quot;] = &quot;Warning: &quot;;
</span><span class="cx"> localizedStrings[&quot;Warnings&quot;] = &quot;Warnings&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -305,6 +305,29 @@
</span><span class="cx">         // Called from WebInspector.MemoryObserver.
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    heapTrackingStarted(timestamp, snapshot)
+    {
+        // Called from WebInspector.HeapObserver.
+
+        this._addRecord(new WebInspector.HeapAllocationsTimelineRecord(timestamp, snapshot));
+
+        this.capturingStarted(timestamp);
+    }
+
+    heapTrackingCompleted(timestamp, snapshot)
+    {
+        // Called from WebInspector.HeapObserver.
+
+        this._addRecord(new WebInspector.HeapAllocationsTimelineRecord(timestamp, snapshot));
+    }
+
+    heapSnapshotAdded(timestamp, snapshot)
+    {
+        // Called from WebInspector.HeapAllocationsInstrument.
+
+        this._addRecord(new WebInspector.HeapAllocationsTimelineRecord(timestamp, snapshot));
+    }
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _processRecord(recordPayload, parentRecordPayload)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesComparesvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Compare.svg (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Compare.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Compare.svg        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright Â© 2016 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;rect fill=&quot;none&quot; stroke=&quot;currentColor&quot; x=&quot;0.5&quot; y=&quot;0.5&quot; width=&quot;15&quot; height=&quot;15&quot; rx=&quot;2&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 3.5 5.5 L 12.5 5.5&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 12.5 5.5 L 9.5 2.5&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 12.5 5.5 L 9.5 8.5&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 3.5 10.5 L 12.5 10.5&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 3.5 10.5 L 6.5 7.5&quot;/&gt;
+    &lt;path fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke=&quot;currentColor&quot; d=&quot;M 3.5 10.5 L 6.5 13.5&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshot.svg (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshot.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshot.svg        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright Â© 2013 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(228, 198, 172)&quot; d=&quot;M 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 L 3 1 Z M 3 1&quot;/&gt;
+    &lt;path fill=&quot;rgb(186, 157, 132)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;rgb(186, 157, 132)&quot; d=&quot;M 5.19849793 12.6584609 C 5.2831472 12.676395 6.98277851 12.9487305 7.62939453 12.9487305 C 8.79640591 12.9487305 9.76331344 12.6806542 10.5034462 12.1146703 C 11.3037555 11.5026691 11.7177734 10.6286312 11.7177734 9.58544922 C 11.7177734 8.84534902 11.4998181 8.18341061 11.0628295 7.63852362 C 10.6767371 7.15709971 10.0557113 6.69185669 9.18734192 6.20492057 L 8.61524891 5.88648574 C 8.27558142 5.69523066 8.15431716 5.69238281 8.23632812 5.69238281 C 8.56703836 5.69238281 9.10333246 5.81936052 9.8138795 6.08542439 L 11.1645508 6.59118236 L 11.1645508 5.14892578 L 11.1645508 3.87597656 L 11.1645508 3.07965768 L 10.3884483 2.90136387 C 9.52406853 2.70279014 8.73593121 2.60205078 8.02148438 2.60205078 C 7.01081351 2.60205078 6.14909735 2.87110984 5.47554965 3.42697448 C 4.76046595 4.01711791 4.38964844 4.82767811 4.38964844 5.77734375 C 4.38964844 6.49239045 4.61205052 7.14196725 5.04920932 7.68841575 C 5.43639142 8.1723
 9338 6.03437082 8.62885808 6.84888633 9.08727887 L 7.38545082 9.38538774 C 7.71699471 9.57330366 7.92926232 9.72631865 7.99164827 9.79813503 C 7.94460492 9.81851991 7.82252674 9.85302734 7.60253906 9.85302734 C 7.14294036 9.85302734 6.53493744 9.70437137 5.79174704 9.39341305 L 4.40576172 8.81350287 L 4.40576172 10.315918 L 4.40576172 11.6801758 L 4.40576172 12.4905083 L 5.19849793 12.6584609 C 5.52713094 12.7280865 5.52713094 12.7280865 5.57407851 12.738033 L 5.19849793 12.6584609 Z M 5.19849793 12.6584609&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 5.40576172 11.6801758 L 5.40576172 10.315918 C 6.26156027 10.6739927 6.99381206 10.8530273 7.60253906 10.8530273 C 8.02864796 10.8530273 8.36433797 10.758139 8.60961914 10.5683594 C 8.85490031 10.3785798 8.97753906 10.1207699 8.97753906 9.79492188 C 8.97753906 9.53710809 8.90055416 9.31958096 8.74658203 9.14233398 C 8.59260991 8.965087 8.3007834 8.75472127 7.87109375 8.51123047 L 7.33935547 8.21582031 C 6.6267868 7.81477664 6.12369938 7.43074728 5.83007812 7.0637207 C 5.53645687 6.69669413 5.38964844 6.2679061 5.38964844 5.77734375 C 5.38964844 5.12206704 5.63045007 4.59570511 6.11206055 4.19824219 C 6.59367103 3.80077926 7.23013927 3.60205078 8.02148438 3.60205078 C 8.65527661 3.60205078 9.36962493 3.69335846 10.1645508 3.87597656 L 10.1645508 5.14892578 C 9.3517212 4.84456228 8.70898674 4.69238281 8.23632812 4.69238281 C 7.87109192 4.69238281 7.57837024 4.77384359 7.3581543 4.93676758 C 7.13793835 5.09969157 7.02783203 5.313638
  7.02783203 5.57861328 C 7.02783203 5.79703885 7.10481694 5.98860595 7.25878906 6.15332031 C 7.41276119 6.31803468 7.70279735 6.52034385 8.12890625 6.76025391 L 8.69824219 7.07714844 C 9.46452206 7.50683809 9.99267433 7.9025047 10.2827148 8.26416016 C 10.5727554 8.62581561 10.7177734 9.06624089 10.7177734 9.58544922 C 10.7177734 10.3230831 10.4438504 10.9013651 9.89599609 11.3203125 C 9.34814179 11.7392599 8.59261549 11.9487305 7.62939453 11.9487305 C 6.99202155 11.9487305 6.25081803 11.8592131 5.40576172 11.6801758 C 5.40576172 11.6801758 6.25081803 11.8592131 5.40576172 11.6801758 L 5.40576172 11.6801758 L 5.40576172 11.6801758 Z M 5.40576172 11.6801758&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotDiffsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotDiff.svg (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotDiff.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotDiff.svg        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright Â© 2013 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(165, 202, 164)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(118, 153, 116)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;rgb(128, 166, 126)&quot; d=&quot;M 4.445312 12.742188 C 3.890625 12.742188 3.445312 12.292969 3.445312 11.742188 L 3.445312 3.792969 C 3.445312 3.242188 3.890625 2.792969 4.445312 2.792969 L 7.867188 2.792969 C 9.367188 2.792969 10.554688 3.222656 11.402344 4.0625 C 12.25 4.910156 12.679688 6.101562 12.679688 7.601562 C 12.679688 9.171875 12.234375 10.429688 11.359375 11.347656 C 10.472656 12.273438 9.246094 12.742188 7.71875 12.742188 L 4.445312 12.742188 M 7.335938 9.613281 C 8.1875 9.613281 8.449219 9.324219 8.535156 9.226562 C 8.789062 8.941406 8.921875 8.414062 8.921875 7.699219 C 8.921875 7.140625 8.8125 6.703125 8.578125 6.363281 C 8.457031 6.183594 8.328125 6.070312 8.1875 6.011719 C 8.0625 5.964844 7.761719 5.882812 7.097656 5.882812 C 7.097656 6.960938 7.097656 8.539062 7.097656 9.613281 C 7.171875 9.613281 7.335938 9.613281 7.335938 9.613281&quot;/&gt;
+    &lt;path fill=&quot;white&quot; d=&quot;M 4.445312 11.742188 L 4.445312 3.792969 L 7.867188 3.792969 C 9.097656 3.792969 10.039062 4.121094 10.695312 4.773438 C 11.351562 5.425781 11.679688 6.371094 11.679688 7.601562 C 11.679688 8.910156 11.332031 9.929688 10.636719 10.65625 C 9.941406 11.378906 8.96875 11.742188 7.71875 11.742188 Z M 6.097656 10.613281 L 7.332031 10.613281 C 8.203125 10.613281 8.851562 10.375 9.28125 9.890625 C 9.707031 9.410156 9.921875 8.679688 9.921875 7.699219 C 9.921875 6.9375 9.75 6.308594 9.40625 5.800781 C 9.171875 5.453125 8.886719 5.214844 8.554688 5.082031 C 8.21875 4.949219 7.734375 4.882812 7.097656 4.882812 L 6.097656 4.882812 Z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotInstancessvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotInstances.svg (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotInstances.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotInstances.svg        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright Â© 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path d=&quot;M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 L 13 1 Z&quot; fill=&quot;rgb(246, 222, 146)&quot;/&gt;
+    &lt;path d=&quot;M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 M 13 2 C 13.552 2 14 2.449 14 3 L 14 13 C 14 13.552 13.552 14 13 14 L 3 14 C 2.449 14 2 13.552 2 13 L 2 3 C 2 2.449 2.449 2 3 2 L 13 2&quot; fill=&quot;rgb(204, 181, 108)&quot;/&gt;
+    &lt;path d=&quot;M 7.9736 11.041 C 8.6766 11.041 9.2346 10.757999 9.6436 10.193 C 10.0536 9.629 10.2586 8.864 10.2586 7.898 C 10.2586 6.962 10.0526 6.210999 9.6406 5.645 C 9.2286 5.079 8.683599 4.795 8.0056 4.795 C 7.3206 4.795 6.7726 5.079 6.3626 5.645 C 5.9526 6.210999 5.7476 6.967999 5.7476 7.915 C 5.7476 8.855 5.9516 9.611 6.3596 10.183 C 6.7676 10.754999 7.3066 11.041 7.9736 11.041 M 7.9526 12.15 C 6.7556 12.15 5.7986 11.766 5.0816 10.997 C 4.3646 10.226999 4.0056 9.202 4.0056 7.92 C 4.0056 6.624 4.3666 5.596 5.0866 4.833 C 5.8076 4.071 6.7806 3.69 8.0056 3.69 C 9.223599 3.69 10.1936 4.071 10.9156 4.833 C 11.6386 5.596 11.9996 6.62 11.9996 7.903999 C 11.9996 9.217999 11.6386 10.254999 10.9156 11.013 C 10.1936 11.771 9.2056 12.15 7.9526 12.15&quot; fill=&quot;white&quot;/&gt;
+    &lt;path d=&quot;M 7.9736 10.041 C 7.6326 10.041 7.3936 9.91 7.1736 9.601999 C 6.8906 9.205999 6.7476 8.638 6.7476 7.915 C 6.7476 7.186999 6.8906 6.620999 7.1726 6.23 C 7.3936 5.926 7.6426 5.795 8.0056 5.795 C 8.3616 5.795 8.6086 5.926 8.8316 6.233 C 9.1156 6.622 9.2586 7.183 9.2586 7.898 C 9.2586 8.643999 9.1166 9.217999 8.834599 9.605 C 8.6136 9.910999 8.355599 10.041 7.9736 10.041 M 8.0056 2.69 C 6.5006 2.69 5.2736 3.18 4.3606 4.146 C 3.4616 5.097 3.0056 6.367 3.0056 7.92 C 3.0056 9.455999 3.4576 10.721 4.3496 11.679 C 5.2616 12.655 6.4736 13.15 7.9526 13.15 C 9.4846 13.15 10.7246 12.663 11.6406 11.702 C 12.5416 10.756 12.9996 9.478 12.9996 7.903999 C 12.9996 6.360999 12.5426 5.096 11.6416 4.145 C 10.7256 3.18 9.5026 2.69 8.0056 2.69 M 7.9736 11.041 C 8.6766 11.041 9.2346 10.757999 9.6436 10.193 C 10.0536 9.629 10.2586 8.864 10.2586 7.898 C 10.2586 6.962 10.0526 6.210999 9.6406 5.645 C 9.2286 5.079 8.683599 4.795 8.0056 4.795 C 7.3206 4.795 6.7726 5.079 6.3626 5.645 C
  5.9526 6.210999 5.7476 6.967999 5.7476 7.915 C 5.7476 8.855 5.9516 9.611 6.3596 10.183 C 6.7676 10.754999 7.3066 11.041 7.9736 11.041 M 8.0056 3.69 C 9.223599 3.69 10.1936 4.071 10.9156 4.833 C 11.6386 5.596 11.9996 6.62 11.9996 7.903999 C 11.9996 9.217999 11.6386 10.254999 10.9156 11.013 C 10.1936 11.771 9.2056 12.15 7.9526 12.15 C 6.7556 12.15 5.7986 11.766 5.0816 10.997 C 4.3646 10.226999 4.0056 9.202 4.0056 7.92 C 4.0056 6.624 4.3666 5.596 5.0866 4.833 C 5.8076 4.071 6.7806 3.69 8.0056 3.69&quot; fill=&quot;rgb(216, 193, 115)&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesHeapSnapshotSummarysvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotSummary.svg (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotSummary.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/HeapSnapshotSummary.svg        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright Â© 2013 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;rgb(245, 245, 245)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(191, 191, 191)&quot; d=&quot;M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2&quot;/&gt;
+    &lt;path fill=&quot;rgb(203, 203, 203)&quot; d=&quot;M 12 6 L 4 6 L 4 4 L 12 4 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(175, 178, 217)&quot; d=&quot;M 12 9 L 4 9 L 4 7 L 12 7 Z&quot;/&gt;
+    &lt;path fill=&quot;rgb(203, 203, 203)&quot; d=&quot;M 12 12 L 4 12 L 4 10 L 12 10 Z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -90,6 +90,10 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/GoToLineDialog.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/GradientEditor.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/GradientSlider.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HeapAllocationsTimelineOverviewGraph.css&quot;&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HeapAllocationsTimelineView.css&quot;&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HeapSnapshotInstancesContentView.css&quot;&gt;
+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HeapSnapshotSummaryContentView.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HierarchicalPathComponent.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/HoverMenu.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/ImageResourceContentView.css&quot;&gt;
</span><span class="lines">@@ -155,6 +159,7 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TabBrowser.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TextContentView.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TextEditor.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TextNavigationItem.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TextResourceContentView.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TimelineDataGrid.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/TimelineIcons.css&quot;&gt;
</span><span class="lines">@@ -308,7 +313,10 @@
</span><span class="cx">     &lt;script src=&quot;Models/GarbageCollection.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/Geometry.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/Gradient.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Models/HeapAllocationsInstrument.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Models/HeapAllocationsTimelineRecord.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Models/HeapSnapshot.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Models/HeapSnapshotDiff.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Models/HeapSnapshotEdge.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/HeapSnapshotNode.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/IndexedDatabase.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -508,6 +516,16 @@
</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/HeapAllocationsTimelineOverviewGraph.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapAllocationsTimelineView.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapAllocationsTimelineDataGridNode.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotClassDataGridNode.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotClusterContentView.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotInstanceDataGridNode.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotInstanceFetchMoreDataGridNode.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotInstancesContentView.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotInstancesDataGridTree.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Views/HeapSnapshotSummaryContentView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/HierarchicalPathNavigationItem.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/HoverMenu.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/ImageResourceContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -594,6 +612,7 @@
</span><span class="cx">     &lt;script src=&quot;Views/StorageSidebarPanel.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/SyntaxHighlightingSupport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/TextContentView.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/TextNavigationItem.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/TextResourceContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/TimelineDataGridNodePathComponent.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/TimelineRecordBar.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsHeapAllocationsInstrumentjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapAllocationsInstrument = class HeapAllocationsInstrument extends WebInspector.Instrument
+{
+    constructor()
+    {
+        super();
+
+        console.assert(WebInspector.HeapAllocationsInstrument.supported());
+
+        this._snapshotIntervalIdentifier = undefined;
+    }
+
+    // Static
+
+    static supported()
+    {
+        // COMPATIBILITY (iOS 9): HeapAgent did not exist.
+        return window.HeapAgent;
+    }
+
+    // Protected
+
+    get timelineRecordType()
+    {
+        return WebInspector.TimelineRecord.Type.HeapAllocations;
+    }
+
+    startInstrumentation()
+    {
+        // FIXME: Include a &quot;track allocations&quot; option for this instrument.
+        // FIXME: Include a periodic snapshot interval option for this instrument.
+
+        HeapAgent.startTracking();
+
+        // Periodic snapshots.
+        const snapshotInterval = 10000;
+        this._snapshotIntervalIdentifier = setInterval(this._takeHeapSnapshot.bind(this), snapshotInterval);
+    }
+
+    stopInstrumentation()
+    {
+        HeapAgent.stopTracking();
+
+        window.clearInterval(this._snapshotIntervalIdentifier);
+        this._snapshotIntervalIdentifier = undefined;
+    }
+
+    // Private
+
+    _takeHeapSnapshot()
+    {
+        HeapAgent.snapshot(function(error, timestamp, snapshotStringData) {
+            let payload = JSON.parse(snapshotStringData);
+            let snapshot = WebInspector.HeapSnapshot.fromPayload(payload);
+            WebInspector.timelineManager.heapSnapshotAdded(timestamp, snapshot);
+        });
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsHeapAllocationsTimelineRecordjsfromrev197953trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsTimelineRecord.js (from rev 197953, trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js) (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsTimelineRecord.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsTimelineRecord.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapAllocationsTimelineRecord = class HeapAllocationsTimelineRecord extends WebInspector.TimelineRecord
+{
+    constructor(timestamp, heapSnapshot)
+    {
+        super(WebInspector.TimelineRecord.Type.HeapAllocations, timestamp, timestamp);
+
+        console.assert(typeof timestamp === &quot;number&quot;);
+        console.assert(heapSnapshot instanceof WebInspector.HeapSnapshot);
+
+        this._timestamp = timestamp;
+        this._heapSnapshot = heapSnapshot;
+    }
+
+    // Public
+
+    get timestamp() { return this._timestamp; }
+    get heapSnapshot() { return this._heapSnapshot; }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsHeapSnapshotDiffjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotDiff.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotDiff.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/HeapSnapshotDiff.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapSnapshotDiff = class HeapSnapshotDiff extends WebInspector.Object
+{
+    constructor(snapshot1, snapshot2)
+    {
+        super();
+
+        console.assert(snapshot1 instanceof WebInspector.HeapSnapshot);
+        console.assert(snapshot2 instanceof WebInspector.HeapSnapshot);
+
+        this._snapshot1 = snapshot1;
+        this._snapshot2 = snapshot2;
+
+        let known = new Map;
+        for (let instance of snapshot1.instances)
+            known.set(instance.id, instance);
+
+        let added = [];
+        for (let instance of snapshot2.instances) {
+            if (known.has(instance.id))
+                known.delete(instance.id);
+            else
+                added.push(instance);
+        }
+
+        let removed = [...known.values()];
+
+        this._addedInstances = added;
+        this._removedInstances = removed;
+    }
+
+    // Public
+
+    get snapshot1() { return this._snapshot1; }
+    get snapshot2() { return this._snapshot2; }
+    get addedInstances() { return this._addedInstances; }
+    get removedInstances() { return this._removedInstances; }
+
+    get sizeDifference()
+    {
+        return this._snapshot2.totalSize - this._snapshot1.totalSize;
+    }
+
+    get growth()
+    {
+        return this._addedInstances.reduce((sum, x) =&gt; sum += x.size, 0);
+    }
+
+    snapshotForDiff()
+    {
+        // FIXME: This only includes the newly added instances. Should we do anything with the removed instances?
+        return new WebInspector.HeapSnapshot(null, this._addedInstances, this._snapshot2.nodeMap);
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecord.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecord.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecord.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -159,6 +159,7 @@
</span><span class="cx">     Script: &quot;timeline-record-type-script&quot;,
</span><span class="cx">     RenderingFrame: &quot;timeline-record-type-rendering-frame&quot;,
</span><span class="cx">     Memory: &quot;timeline-record-type-memory&quot;,
</span><ins>+    HeapAllocations: &quot;timeline-record-type-heap-allocations&quot;,
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.TimelineRecord.TypeIdentifier = &quot;timeline-record&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsTimelineRecordingjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx">             WebInspector.TimelineRecord.Type.Script,
</span><span class="cx">             WebInspector.TimelineRecord.Type.RenderingFrame,
</span><span class="cx">             WebInspector.TimelineRecord.Type.Memory,
</span><ins>+            WebInspector.TimelineRecord.Type.HeapAllocations,
</ins><span class="cx">         ];
</span><span class="cx"> 
</span><span class="cx">         for (let type of timelines) {
</span><span class="lines">@@ -243,7 +244,8 @@
</span><span class="cx">         // Some records don't have source code timelines.
</span><span class="cx">         if (record.type === WebInspector.TimelineRecord.Type.Network
</span><span class="cx">             || record.type === WebInspector.TimelineRecord.Type.RenderingFrame
</span><del>-            || record.type === WebInspector.TimelineRecord.Type.Memory)
</del><ins>+            || record.type === WebInspector.TimelineRecord.Type.Memory
+            || record.type === WebInspector.TimelineRecord.Type.HeapAllocations)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         if (!WebInspector.TimelineRecording.sourceCodeTimelinesSupported())
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -36,13 +36,13 @@
</span><span class="cx">     {
</span><span class="cx">         let payload = JSON.parse(snapshotData);
</span><span class="cx">         let snapshot = WebInspector.HeapSnapshot.fromPayload(payload);
</span><del>-        // FIXME: Heap Allocations Timeline.
</del><ins>+        WebInspector.timelineManager.heapTrackingStarted(timestamp, snapshot);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     trackingComplete(timestamp, snapshotData)
</span><span class="cx">     {
</span><span class="cx">         let payload = JSON.parse(snapshotData);
</span><span class="cx">         let snapshot = WebInspector.HeapSnapshot.fromPayload(payload);
</span><del>-        // FIXME: Heap Allocations Timeline.
</del><ins>+        WebInspector.timelineManager.heapTrackingCompleted(timestamp, snapshot);
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTesthtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Test.html (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Test.html        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Test.html        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -112,7 +112,10 @@
</span><span class="cx">     &lt;script src=&quot;Models/Frame.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/GarbageCollection.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/Geometry.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Models/HeapAllocationsInstrument.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;Models/HeapAllocationsTimelineRecord.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Models/HeapSnapshot.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Models/HeapSnapshotDiff.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Models/HeapSnapshotEdge.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/HeapSnapshotNode.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Models/IndexedDatabase.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -73,6 +73,9 @@
</span><span class="cx"> 
</span><span class="cx">             if (timelineType === WebInspector.TimelineRecord.Type.Memory)
</span><span class="cx">                 return new WebInspector.MemoryTimelineView(representedObject, extraArguments);
</span><ins>+
+            if (timelineType === WebInspector.TimelineRecord.Type.HeapAllocations)
+                return new WebInspector.HeapAllocationsTimelineView(representedObject, extraArguments);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (representedObject instanceof WebInspector.Breakpoint) {
</span><span class="lines">@@ -135,6 +138,9 @@
</span><span class="cx">         if (representedObject instanceof WebInspector.CallingContextTree)
</span><span class="cx">             return new WebInspector.ProfileView(representedObject, extraArguments);
</span><span class="cx"> 
</span><ins>+        if (representedObject instanceof WebInspector.HeapSnapshot)
+            return new WebInspector.HeapSnapshotClusterContentView(representedObject, extraArguments);
+
</ins><span class="cx">         if (typeof representedObject === &quot;string&quot; || representedObject instanceof String)
</span><span class="cx">             return new WebInspector.TextContentView(representedObject, extraArguments);
</span><span class="cx"> 
</span><span class="lines">@@ -231,6 +237,8 @@
</span><span class="cx">             return true;
</span><span class="cx">         if (representedObject instanceof WebInspector.CallingContextTree)
</span><span class="cx">             return true;
</span><ins>+        if (representedObject instanceof WebInspector.HeapSnapshot)
+            return true;
</ins><span class="cx">         if (typeof representedObject === &quot;string&quot; || representedObject instanceof String)
</span><span class="cx">             return true;
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.FormattedValue.createElementForNodePreview = function(preview)
</span><span class="cx"> {
</span><del>-    var value = preview.value;
</del><ins>+    var value = preview.value || preview.description;
</ins><span class="cx">     var span = document.createElement(&quot;span&quot;);
</span><span class="cx">     span.className = &quot;formatted-node-preview syntax-highlighted&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -153,6 +153,14 @@
</span><span class="cx">     return span;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.FormattedValue.createElementForFunctionWithName = function(description)
+{
+    var span = document.createElement(&quot;span&quot;);
+    span.classList.add(&quot;formatted-function&quot;);
+    span.textContent = description.substring(0, description.indexOf(&quot;(&quot;));
+    return span;
+}
+
</ins><span class="cx"> WebInspector.FormattedValue.createElementForTypesAndValue = function(type, subtype, displayString, size, isPreview, hadException)
</span><span class="cx"> {
</span><span class="cx">     var span = document.createElement(&quot;span&quot;);
</span><span class="lines">@@ -208,6 +216,17 @@
</span><span class="cx">     return WebInspector.FormattedValue.createElementForTypesAndValue(propertyPreview.type, propertyPreview.subtype, propertyPreview.value, undefined, true, false);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview = function(objectPreview, previewViewMode)
+{
+    if (objectPreview.subtype === &quot;node&quot;)
+        return WebInspector.FormattedValue.createElementForNodePreview(objectPreview);
+
+    if (objectPreview.type === &quot;function&quot;)
+        return WebInspector.FormattedValue.createElementForFunctionWithName(objectPreview.description);
+
+    return new WebInspector.ObjectPreviewView(objectPreview, previewViewMode).element;
+}
+
</ins><span class="cx"> WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForRemoteObject = function(object, previewViewMode)
</span><span class="cx"> {
</span><span class="cx">     if (object.subtype === &quot;node&quot;)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineDataGridNodejs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapAllocationsTimelineDataGridNode = class HeapAllocationsTimelineDataGridNode extends WebInspector.TimelineDataGridNode
+{
+    constructor(heapAllocationsTimelineRecord, zeroTime, heapAllocationsView)
+    {
+        super(false, null);
+
+        this._record = heapAllocationsTimelineRecord;
+        this._heapAllocationsView = heapAllocationsView;
+
+        this._data = {
+            name: WebInspector.UIString(&quot;Snapshot %d&quot;).format(this._record.heapSnapshot.identifier),
+            timestamp: this._record.timestamp - zeroTime,
+            size: this._record.heapSnapshot.totalSize,
+        };
+    }
+
+    // Public
+
+    get record() { return this._record; }
+    get data() { return this._data; }
+
+    createCellContent(columnIdentifier, cell)
+    {
+        switch (columnIdentifier) {
+        case &quot;name&quot;:
+            let fragment = document.createDocumentFragment();
+            let iconElement = fragment.appendChild(document.createElement(&quot;img&quot;));
+            iconElement.classList.add(&quot;icon&quot;, &quot;heap-snapshot&quot;);
+            let titleElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            titleElement.textContent = this._data.name;
+            let goToButton = fragment.appendChild(WebInspector.createGoToArrowButton());
+            goToButton.addEventListener(&quot;click&quot;, (event) =&gt; {
+                this._heapAllocationsView.showHeapSnapshotTimelineRecord(this._record);
+            });
+            return fragment;
+
+        case &quot;timestamp&quot;:
+            return Number.secondsToString(this._data.timestamp, true);
+
+        case &quot;size&quot;:
+            return Number.bytesToString(this._data.size);
+        }
+
+        return super.createCellContent(columnIdentifier, cell);
+    }
+
+    markAsBaseline()
+    {
+        this.element.classList.add(&quot;baseline&quot;);
+    }
+
+    clearBaseline()
+    {
+        this.element.classList.remove(&quot;baseline&quot;);
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineOverviewGraphcssfromrev197953trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css (from rev 197953, trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js) (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.timeline-overview-graph.heap-allocations {
+    position: relative;
+}
+
+.timeline-overview-graph.heap-allocations &gt; img.snapshot {
+    content: url(../Images/HeapSnapshot.svg);
+    position: absolute;
+    top: 9px;
+    width: 16px;
+    height: 16px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineOverviewGraphjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,94 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapAllocationsTimelineOverviewGraph = class HeapAllocationsTimelineOverviewGraph extends WebInspector.TimelineOverviewGraph
+{
+    constructor(timeline, timelineOverview)
+    {
+        super(timelineOverview);
+
+        this.element.classList.add(&quot;heap-allocations&quot;);
+
+        this._heapAllocationsTimeline = timeline;
+        this._heapAllocationsTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._heapAllocationTimelineRecordAdded, this);
+
+        this.reset();
+    }
+
+    // Protected
+
+    reset()
+    {
+        super.reset();
+
+        this.element.removeChildren();
+    }
+
+    layout()
+    {
+        this.element.removeChildren();
+
+        // This may display records past the current time marker.
+        let visibleRecords = this._visibleRecords(this.startTime, this.endTime);
+        if (!visibleRecords.length)
+            return;
+
+        let graphStartTime = this.startTime;
+        let secondsPerPixel = this.timelineOverview.secondsPerPixel;
+
+        function xScale(time) {
+            return (time - graphStartTime) / secondsPerPixel;
+        }
+
+        for (let record of visibleRecords) {
+            const halfImageWidth = 8;
+            let x = xScale(record.timestamp) - halfImageWidth;
+            if (x &lt;= 1)
+                x = 1;
+
+            let imageElement = this.element.appendChild(document.createElement(&quot;img&quot;));
+            imageElement.classList.add(&quot;snapshot&quot;);
+            imageElement.style.left = x + &quot;px&quot;;
+            imageElement.addEventListener(&quot;click&quot;, (event) =&gt; {
+                this.timelineOverview.userSelectedRecord(record);
+            });
+        }
+    }
+
+    // Private
+
+    _visibleRecords(startTime, endTime)
+    {
+        let records = this._heapAllocationsTimeline.records;
+        let lowerIndex = records.lowerBound(startTime, (time, record) =&gt; time - record.timestamp);
+        let upperIndex = records.upperBound(endTime, (time, record) =&gt; time - record.timestamp);
+        return records.slice(lowerIndex, upperIndex);
+    }
+
+    _heapAllocationTimelineRecordAdded(event)
+    {
+        this.needsLayout();
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewcssfromrev197953trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.css (from rev 197953, trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js) (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.timeline-view.heap-allocations &gt; .data-grid {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+}
+
+.timeline-view.heap-allocations &gt; .data-grid td .icon.heap-snapshot {
+    content: url(../Images/HeapSnapshot.svg);
+}
+
+.timeline-view.heap-allocations &gt; .data-grid tr.baseline {
+    background: hsl(129, 29%, 77%);
+}
+
+.timeline-view.heap-allocations &gt; .content-view-container {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+}
+
+.timeline-view.heap-allocations &gt; .content-view-container &gt; .content-view {
+    border-top: 1px solid var(--border-color);
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapAllocationsTimelineViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,357 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapAllocationsTimelineView = class HeapAllocationsTimelineView extends WebInspector.TimelineView
+{
+    constructor(timeline, extraArguments)
+    {
+        super(timeline, extraArguments);
+
+        console.assert(timeline.type === WebInspector.TimelineRecord.Type.HeapAllocations, timeline);
+
+        this.element.classList.add(&quot;heap-allocations&quot;);
+
+        let columns = {
+            name: {
+                title: WebInspector.UIString(&quot;Name&quot;),
+                width: &quot;150px&quot;,
+            },
+            timestamp: {
+                title: WebInspector.UIString(&quot;Time&quot;),
+                width: &quot;80px&quot;,
+                sortable: true,
+                aligned: &quot;right&quot;,
+            },
+            size: {
+                title: WebInspector.UIString(&quot;Size&quot;),
+                width: &quot;80px&quot;,
+                sortable: true,
+                aligned: &quot;right&quot;,
+            },
+        };
+
+        let snapshotTooltip = WebInspector.UIString(&quot;Take snapshot&quot;);
+        this._takeHeapSnapshotButtonItem = new WebInspector.ButtonNavigationItem(&quot;take-snapshot&quot;, snapshotTooltip, &quot;Images/HeapSnapshot.svg&quot;, 16, 16);
+        this._takeHeapSnapshotButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._takeHeapSnapshotClicked, this);
+
+        let defaultToolTip = WebInspector.UIString(&quot;Compare snapshots&quot;);
+        let activatedToolTip = WebInspector.UIString(&quot;Cancel comparison&quot;);
+        this._compareHeapSnapshotsButtonItem = new WebInspector.ActivateButtonNavigationItem(&quot;compare-heap-snapshots&quot;, defaultToolTip, activatedToolTip, &quot;Images/Compare.svg&quot;, 16, 16);
+        this._compareHeapSnapshotsButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._compareHeapSnapshotsClicked, this);
+        this._compareHeapSnapshotsButtonItem.enabled = false;
+        this._compareHeapSnapshotsButtonItem.activated = false;
+
+        this._compareHeapSnapshotHelpTextItem = new WebInspector.TextNavigationItem(&quot;compare-heap-snapshot-help-text&quot;, &quot;&quot;);
+
+        this._selectingComparisonHeapSnapshots = false;
+        this._baselineDataGridNode = null;
+        this._baselineHeapSnapshotTimelineRecord = null;
+        this._heapSnapshotDiff = null;
+
+        this._showingSnapshotList = true;
+
+        this._snapshotListPathComponent = new WebInspector.HierarchicalPathComponent(WebInspector.UIString(&quot;Snapshot List&quot;), &quot;snapshot-list-icon&quot;, &quot;snapshot-list&quot;, false, false);
+        this._snapshotListPathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.Clicked, this._snapshotListPathComponentClicked, this);
+
+        this._dataGrid = new WebInspector.TimelineDataGrid(this.navigationSidebarTreeOutline, columns);
+        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;heap-allocations-timeline-view-sort&quot;, &quot;timestamp&quot;);
+        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;heap-allocations-timeline-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Ascending);
+        this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
+        this.addSubview(this._dataGrid);
+
+        this._contentViewContainer = new WebInspector.ContentViewContainer;
+        this._contentViewContainer.addEventListener(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange, this._currentContentViewDidChange, this);
+        WebInspector.ContentView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._contentViewSelectionPathComponentDidChange, this);
+
+        this._pendingRecords = [];
+
+        timeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._heapAllocationsTimelineRecordAdded, this);
+    }
+
+    // Public
+
+    showHeapSnapshotList()
+    {
+        if (this._showingSnapshotList)
+            return;
+
+        this._showingSnapshotList = true;
+        this._heapSnapshotDiff = null;
+        this._cancelSelectComparisonHeapSnapshots();
+
+        this.removeSubview(this._contentViewContainer);
+        this.addSubview(this._dataGrid);
+
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
+    }
+
+    showHeapSnapshotTimelineRecord(heapSnapshotTimelineRecord)
+    {
+        if (this._showingSnapshotList) {
+            this.removeSubview(this._dataGrid);
+            this.addSubview(this._contentViewContainer);
+        }
+
+        this._showingSnapshotList = false;
+        this._heapSnapshotDiff = null;
+        this._cancelSelectComparisonHeapSnapshots();
+
+        let treeElement = this.navigationSidebarTreeOutline.findTreeElement(heapSnapshotTimelineRecord);
+        console.assert(treeElement, &quot;Should have a TreeElement for the HeapSnapshot&quot;);
+        if (treeElement)
+            treeElement.select();
+
+        let shouldManuallyTriggerContentViewUpdate = this._contentViewContainer.currentContentView &amp;&amp; this._contentViewContainer.currentContentView.representedObject === heapSnapshotTimelineRecord.heapSnapshot;
+
+        this._contentViewContainer.showContentViewForRepresentedObject(heapSnapshotTimelineRecord.heapSnapshot);
+
+        if (shouldManuallyTriggerContentViewUpdate)
+            this._currentContentViewDidChange();
+    }
+
+    showHeapSnapshotDiff(heapSnapshotDiff)
+    {
+        if (this._showingSnapshotList) {
+            this.removeSubview(this._dataGrid);
+            this.addSubview(this._contentViewContainer);
+        }
+
+        this._showingSnapshotList = false;
+        this._heapSnapshotDiff = heapSnapshotDiff;
+
+        this._contentViewContainer.showContentViewForRepresentedObject(heapSnapshotDiff.snapshotForDiff());
+    }
+
+    // Protected
+
+    get navigationItems()
+    {
+        if (this._showingSnapshotList) {
+            let items = [this._takeHeapSnapshotButtonItem, this._compareHeapSnapshotsButtonItem];
+            if (this._selectingComparisonHeapSnapshots)
+                items.push(this._compareHeapSnapshotHelpTextItem);
+            return items;
+        }
+
+        return this._contentViewContainer.currentContentView.navigationItems;
+    }
+
+    get selectionPathComponents()
+    {
+        let components = [this._snapshotListPathComponent];
+
+        if (this._showingSnapshotList)
+            return components;
+
+        if (this._heapSnapshotDiff) {
+            let firstSnapshotIdentifier = this._heapSnapshotDiff.snapshot1.identifier;
+            let secondSnapshotIdentifier = this._heapSnapshotDiff.snapshot2.identifier;
+            let diffComponent = new WebInspector.HierarchicalPathComponent(WebInspector.UIString(&quot;Snapshot Comparison (%d and %d)&quot;).format(firstSnapshotIdentifier, secondSnapshotIdentifier), &quot;snapshot-diff-icon&quot;, &quot;snapshot-diff&quot;);
+            components.push(diffComponent);
+        } else {
+            if (this.navigationSidebarTreeOutline.selectedTreeElement) {
+                let heapSnapshotPathComponent = new WebInspector.GeneralTreeElementPathComponent(this.navigationSidebarTreeOutline.selectedTreeElement);
+                heapSnapshotPathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this._snapshotPathComponentSelected, this);
+                components.push(heapSnapshotPathComponent);
+            }
+        }
+
+        return components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
+    }
+
+    get navigationSidebarTreeOutlineLabel()
+    {
+        // FIXME: Nothing. The sidebar will soon be removed.
+        return WebInspector.UIString(&quot;Snapshots&quot;);
+    }
+
+    userSelectedRecordFromOverview(timelineRecord)
+    {
+        this.showHeapSnapshotTimelineRecord(timelineRecord);
+    }
+
+    closed()
+    {
+        console.assert(this.representedObject instanceof WebInspector.Timeline);
+        this.representedObject.removeEventListener(null, null, this);
+    }
+
+    layout()
+    {
+        // Wait to show records until our zeroTime has been set.
+        if (this._pendingRecords.length &amp;&amp; this.zeroTime) {
+            for (let heapAllocationsTimelineRecord of this._pendingRecords) {
+                let treeElement = new WebInspector.TimelineRecordTreeElement(heapAllocationsTimelineRecord);
+                let dataGridNode = new WebInspector.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, this.zeroTime, this);
+                this._dataGrid.addRowInSortOrder(treeElement, dataGridNode);
+            }
+
+            this._pendingRecords = [];
+            this._updateCompareHeapSnapshotButton();
+        }
+    }
+
+    reset()
+    {
+        super.reset();
+
+        this.showHeapSnapshotList();
+        this._pendingRecords = [];
+        this._updateCompareHeapSnapshotButton();
+    }
+
+    // Private
+
+    _heapAllocationsTimelineRecordAdded(event)
+    {
+        this._pendingRecords.push(event.data.record);
+
+        this.needsLayout();
+    }
+
+    _snapshotListPathComponentClicked(event)
+    {
+        this.showHeapSnapshotList();
+    }
+
+    _snapshotPathComponentSelected(event)
+    {
+        console.assert(event.data.pathComponent.representedObject instanceof WebInspector.HeapAllocationsTimelineRecord);
+        this.showHeapSnapshotTimelineRecord(event.data.pathComponent.representedObject);
+    }
+
+    _currentContentViewDidChange(event)
+    {
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
+    }
+
+    _contentViewSelectionPathComponentDidChange(event)
+    {
+        if (event.target !== this._contentViewContainer.currentContentView)
+            return;
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
+    }
+
+    _updateCompareHeapSnapshotButton()
+    {
+        let hasAtLeastTwoSnapshots = false;
+
+        let count = 0;
+        for (let node of this._dataGrid.children) {
+            if (node.revealed &amp;&amp; !node.hidden) {
+                count++;
+                if (count === 2) {
+                    hasAtLeastTwoSnapshots = true;
+                    break;
+                }
+            }
+        }
+
+        this._compareHeapSnapshotsButtonItem.enabled = hasAtLeastTwoSnapshots;
+    }
+
+    _takeHeapSnapshotClicked()
+    {
+        HeapAgent.snapshot(function(error, timestamp, snapshotStringData) {
+            let payload = JSON.parse(snapshotStringData);
+            let snapshot = WebInspector.HeapSnapshot.fromPayload(payload);
+            WebInspector.timelineManager.heapSnapshotAdded(timestamp, snapshot);
+        });
+    }
+
+    _cancelSelectComparisonHeapSnapshots()
+    {
+        if (!this._selectingComparisonHeapSnapshots)
+            return;
+
+        if (this._baselineDataGridNode)
+            this._baselineDataGridNode.clearBaseline();
+
+        this._selectingComparisonHeapSnapshots = false;
+        this._baselineDataGridNode = null;
+        this._baselineHeapSnapshotTimelineRecord = null;
+
+        this._compareHeapSnapshotsButtonItem.activated = false;
+
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
+    }
+
+    _compareHeapSnapshotsClicked(event)
+    {
+        let newActivated = !this._compareHeapSnapshotsButtonItem.activated;
+        this._compareHeapSnapshotsButtonItem.activated = newActivated;
+
+        if (!newActivated) {
+            this._cancelSelectComparisonHeapSnapshots();
+            return;
+        }
+
+        if (this.navigationSidebarTreeOutline.selectedTreeElement)
+            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+
+        this._selectingComparisonHeapSnapshots = true;
+        this._baselineHeapSnapshotTimelineRecord = null;
+        this._compareHeapSnapshotHelpTextItem.text = WebInspector.UIString(&quot;Select baseline snapshot&quot;);
+
+        this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
+    }
+
+    _dataGridNodeSelected(event)
+    {
+        if (!this._selectingComparisonHeapSnapshots)
+            return;
+
+        let dataGridNode = this._dataGrid.selectedNode;
+        if (!dataGridNode)
+            return;
+
+        let heapAllocationsTimelineRecord = dataGridNode.record;
+        if (this._baselineHeapSnapshotTimelineRecord === heapAllocationsTimelineRecord) {
+            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+            return;
+        }
+
+        // Selected Baseline.
+        if (!this._baselineHeapSnapshotTimelineRecord) {
+            this._baselineDataGridNode = dataGridNode;
+            this._baselineDataGridNode.markAsBaseline();
+            this._baselineHeapSnapshotTimelineRecord = heapAllocationsTimelineRecord;
+            this.navigationSidebarTreeOutline.selectedTreeElement.deselect();
+            this._compareHeapSnapshotHelpTextItem.text = WebInspector.UIString(&quot;Select comparison snapshot&quot;);
+            this.dispatchEventToListeners(WebInspector.ContentView.Event.NavigationItemsDidChange);
+            return;
+        }
+
+        // Selected Comparison.
+        let diff = new WebInspector.HeapSnapshotDiff(this._baselineHeapSnapshotTimelineRecord.heapSnapshot, heapAllocationsTimelineRecord.heapSnapshot);
+        this.showHeapSnapshotDiff(diff);
+
+        this._baselineDataGridNode.clearBaseline();
+        this._selectingComparisonHeapSnapshots = false;
+        this._compareHeapSnapshotsButtonItem.activated = false;
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClassDataGridNodejs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClassDataGridNode.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,181 @@
</span><ins>+/*
+* Copyright (C) 2016 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+WebInspector.HeapSnapshotClassDataGridNode = class HeapSnapshotClassDataGridNode extends WebInspector.DataGridNode
+{
+    constructor(data, tree)
+    {
+        super(data, true);
+
+        this._data = data;
+        this._tree = tree;
+
+        this._batched = false;
+        this._instances = null;
+
+        this.addEventListener(&quot;populate&quot;, this._populate, this);
+    }
+
+    // Protected
+
+    get data() { return this._data; }
+
+    createCellContent(columnIdentifier)
+    {
+        if (columnIdentifier === &quot;size&quot;) {
+            let {size, percent} = this._data;
+            let fragment = document.createDocumentFragment();
+            let timeElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            timeElement.classList.add(&quot;size&quot;);
+            timeElement.textContent = Number.bytesToString(size);
+            let percentElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            percentElement.classList.add(&quot;percentage&quot;);
+            percentElement.textContent = Number.percentageString(percent);
+            return fragment;
+        }
+
+        if (columnIdentifier === &quot;className&quot;) {
+            let {className, allInternal} = this._data;
+            let fragment = document.createDocumentFragment();
+            let iconElement = fragment.appendChild(document.createElement(&quot;img&quot;));
+            iconElement.classList.add(&quot;icon&quot;, WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName(className, allInternal));
+            let nameElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            nameElement.classList.add(&quot;class-name&quot;);
+            nameElement.textContent = className;
+            return fragment;
+        }
+
+        return super.createCellContent(columnIdentifier);
+    }
+
+    sort()
+    {
+        if (this._batched) {
+            this._removeFetchMoreDataGridNode();
+            this._updateBatchedSort();
+            this._updateBatchedChildren();
+            this._appendFetchMoreDataGridNode();
+            return;
+        }
+
+        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();
+        }
+    }
+
+    // Private
+
+    _populate()
+    {
+        this.removeEventListener(&quot;populate&quot;, this._populate, this);
+
+        let instances = this._tree.heapSnapshot.instancesWithClassName(this._data.className);
+
+        // Batch.
+        if (instances.length &gt; WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit) {
+            // FIXME: This should respect the this._tree.includeInternalObjects setting.
+            this._instances = instances;
+            this._batched = true;
+            this._updateBatchedSort();
+            this._fetchBatch(WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit);
+            return;
+        }
+
+        for (let instance of instances) {
+            if (instance.internal &amp;&amp; !this._tree.includeInternalObjects)
+                continue;
+            this.appendChild(new WebInspector.HeapSnapshotInstanceDataGridNode(instance, this._tree));
+        }
+
+        this.sort();
+    }
+
+    _fetchBatch(batchSize)
+    {
+        if (this._batched &amp;&amp; this.children.length)
+            this._removeFetchMoreDataGridNode();
+
+        let oldCount = this.children.length;
+        let newCount = oldCount + batchSize;
+
+        if (newCount &gt;= this._instances.length) {
+            newCount = this._instances.length - 1;
+            this._batched = false;
+        }
+
+        let count = newCount - oldCount;
+        for (let i = 0; i &lt;= count; ++i) {
+            let instance = this._instances[oldCount + i];
+            this.appendChild(new WebInspector.HeapSnapshotInstanceDataGridNode(instance, this._tree));
+        }
+
+        if (this._batched)
+            this._appendFetchMoreDataGridNode();
+    }
+
+    _updateBatchedSort()
+    {
+        this._instances.sort((a, b) =&gt; {
+            let fakeDataGridNodeA = {data: a};
+            let fakeDataGridNodeB = {data: b};
+            return this._tree._sortComparator(fakeDataGridNodeA, fakeDataGridNodeB);
+        });
+    }
+
+    _updateBatchedChildren()
+    {
+        let count = this.children.length;
+
+        this.removeChildren();
+
+        for (let i = 0; i &lt; count; ++i)
+            this.appendChild(new WebInspector.HeapSnapshotInstanceDataGridNode(this._instances[i], this._tree));
+    }
+
+    _removeFetchMoreDataGridNode()
+    {
+        console.assert(this.children[this.children.length - 1] instanceof WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode);
+
+        this.removeChild(this.children[this.children.length - 1]);
+    }
+
+    _appendFetchMoreDataGridNode()
+    {
+        console.assert(!(this.children[this.children.length - 1] instanceof WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode));
+
+        let count = this.children.length;
+        let totalCount = this._instances.length;
+        let remainingCount = totalCount - count;
+        let batchSize = remainingCount &gt;= WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit ? WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit : 0;
+
+        this.appendChild(new WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode(this._tree, batchSize, remainingCount, this._fetchBatch.bind(this)));
+    }
+};
+
+WebInspector.HeapSnapshotClassDataGridNode.ChildrenBatchLimit = 100;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotClusterContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotClusterContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,276 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapSnapshotClusterContentView = class HeapSnapshotClusterContentView extends WebInspector.ClusterContentView
+{
+    constructor(heapSnapshot)
+    {
+        super(heapSnapshot);
+
+        console.assert(heapSnapshot instanceof WebInspector.HeapSnapshot);
+
+        this._heapSnapshot = heapSnapshot;
+
+        function createPathComponent(displayName, className, identifier)
+        {
+            let pathComponent = new WebInspector.HierarchicalPathComponent(displayName, className, identifier, false, true);
+            pathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this._pathComponentSelected, this);
+            return pathComponent;
+        }
+
+        this._shownInitialContent = false;
+        this._summaryContentView = null;
+        this._instancesContentView = null;
+
+        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();
+
+        this._summaryPathComponent = createPathComponent.call(this, WebInspector.UIString(&quot;Summary&quot;), &quot;heap-snapshot-summary-icon&quot;, WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
+        this._instancesPathComponent = createPathComponent.call(this, WebInspector.UIString(&quot;Instances&quot;), &quot;heap-snapshot-instances-icon&quot;, WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier);
+
+        this._summaryPathComponent.nextSibling = this._instancesPathComponent;
+        this._instancesPathComponent.previousSibling = this._summaryPathComponent;
+
+        this._currentContentViewSetting = new WebInspector.Setting(&quot;heap-snapshot-cluster-current-view&quot;, WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
+    }
+
+    // Static
+
+    static iconStyleClassNameForClassName(className, internal)
+    {
+        if (internal)
+            return &quot;unknown&quot;;
+
+        switch (className) {
+        case &quot;Object&quot;:
+        case &quot;Array&quot;:
+        case &quot;Map&quot;:
+        case &quot;Set&quot;:
+        case &quot;WeakMap&quot;:
+        case &quot;WeakSet&quot;:
+        case &quot;Promise&quot;:
+        case &quot;Error&quot;:
+        case &quot;Window&quot;:
+        case &quot;Map Iterator&quot;:
+        case &quot;Set Iterator&quot;:
+        case &quot;Math&quot;:
+        case &quot;JSON&quot;:
+        case &quot;GlobalObject&quot;:
+            return &quot;object&quot;;
+        case &quot;Function&quot;:
+            return &quot;function&quot;;
+        case &quot;RegExp&quot;:
+            return &quot;regex&quot;;
+        case &quot;Number&quot;:
+            return &quot;number&quot;;
+        case &quot;Boolean&quot;:
+            return &quot;boolean&quot;;
+        case &quot;String&quot;:
+        case &quot;string&quot;:
+            return &quot;string&quot;;
+        case &quot;Symbol&quot;:
+        case &quot;symbol&quot;:
+            return &quot;symbol&quot;;
+        }
+
+        if (className.endsWith(&quot;Prototype&quot;))
+            return &quot;object&quot;;
+        if (className.endsWith(&quot;Element&quot;) || className === &quot;Node&quot; || className === &quot;Text&quot;)
+            return &quot;node&quot;;
+
+        return &quot;native&quot;;
+    }
+
+    // Public
+
+    get heapSnapshot() { return this._heapSnapshot; }
+
+    get summaryContentView()
+    {
+        if (!this._summaryContentView)
+            this._summaryContentView = new WebInspector.HeapSnapshotSummaryContentView(this._heapSnapshot, this._contentViewExtraArguments());
+        return this._summaryContentView;
+    }
+
+    get instancesContentView()
+    {
+        if (!this._instancesContentView)
+            this._instancesContentView = new WebInspector.HeapSnapshotInstancesContentView(this._heapSnapshot, this._contentViewExtraArguments());
+        return this._instancesContentView;
+    }
+
+    get navigationItems()
+    {
+        return [this._showInternalObjectsButtonNavigationItem];
+    }
+
+    get selectionPathComponents()
+    {
+        let currentContentView = this._contentViewContainer.currentContentView;
+        if (!currentContentView)
+            return [];
+
+        let components = [this._pathComponentForContentView(currentContentView)];
+        return components.concat(currentContentView.selectionPathComponents);
+    }
+
+    shown()
+    {
+        super.shown();
+
+        if (this._shownInitialContent) {
+            this._updateViewsForShowInternalObjectsSettingValue();
+            return;
+        }
+
+        this._showContentViewForIdentifier(this._currentContentViewSetting.value);
+    }
+
+    closed()
+    {
+        super.closed();
+
+        this._shownInitialContent = false;
+    }
+
+    saveToCookie(cookie)
+    {
+        cookie[WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey] = this._currentContentViewSetting.value;
+    }
+
+    restoreFromCookie(cookie)
+    {
+        this._showContentViewForIdentifier(cookie[WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey]);
+    }
+
+    showSummary()
+    {
+        this._shownInitialContent = true;
+        return this._showContentViewForIdentifier(WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier);
+    }
+
+    showInstances()
+    {
+        this._shownInitialContent = true;
+        return this._showContentViewForIdentifier(WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier);
+    }
+
+    // Private
+
+    _contentViewExtraArguments()
+    {
+        return {showInternalObjects: WebInspector.HeapSnapshotClusterContentView.showInternalObjectsSetting.value};
+    }
+
+    _pathComponentForContentView(contentView)
+    {
+        console.assert(contentView);
+        if (!contentView)
+            return null;
+        if (contentView === this._summaryContentView)
+            return this._summaryPathComponent;
+        if (contentView === this._instancesContentView)
+            return this._instancesPathComponent;
+        console.error(&quot;Unknown contentView.&quot;);
+        return null;
+    }
+
+    _identifierForContentView(contentView)
+    {
+        console.assert(contentView);
+        if (!contentView)
+            return null;
+        if (contentView === this._summaryContentView)
+            return WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier;
+        if (contentView === this._instancesContentView)
+            return WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier;
+        console.error(&quot;Unknown contentView.&quot;);
+        return null;
+    }
+
+    _showContentViewForIdentifier(identifier)
+    {
+        let contentViewToShow = null;
+
+        switch (identifier) {
+        case WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier:
+            contentViewToShow = this.summaryContentView;
+            break;
+        case WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier:
+            contentViewToShow = this.instancesContentView;
+            break;
+        }
+
+        if (!contentViewToShow)
+            contentViewToShow = this.instancesContentView;
+
+        console.assert(contentViewToShow);
+
+        this._shownInitialContent = true;
+
+        this._currentContentViewSetting.value = this._identifierForContentView(contentViewToShow);
+
+        return this.contentViewContainer.showContentView(contentViewToShow);
+    }
+
+    _pathComponentSelected(event)
+    {
+        this._showContentViewForIdentifier(event.data.pathComponent.representedObject);
+    }
+
+    _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;
+    }
+};
+
+WebInspector.HeapSnapshotClusterContentView.ContentViewIdentifierCookieKey = &quot;heap-snapshot-cluster-content-view-identifier&quot;;
+
+WebInspector.HeapSnapshotClusterContentView.SummaryIdentifier = &quot;summary&quot;;
+WebInspector.HeapSnapshotClusterContentView.InstancesIdentifier = &quot;instances&quot;;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstanceDataGridNodejs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,153 @@
</span><ins>+/*
+* Copyright (C) 2016 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+WebInspector.HeapSnapshotInstanceDataGridNode = class HeapSnapshotInstanceDataGridNode extends WebInspector.DataGridNode
+{
+    constructor(node, tree)
+    {
+        super(node, false);
+
+        console.assert(node instanceof WebInspector.HeapSnapshotNode);
+
+        this._node = node;
+        this._tree = tree;
+
+        // FIXME: Make instance grid nodes copyable.
+        this.copyable = false;
+
+        this._percent = (this._node.size / this._tree._heapSnapshot.totalSize) * 100;
+    }
+
+    // Protected
+
+    get data() { return this._node; }
+    get selectable() { return false; }
+
+    createCells()
+    {
+        super.createCells();
+
+        this.element.classList.add(&quot;instance&quot;);
+    }
+
+    createCellContent(columnIdentifier)
+    {
+        if (columnIdentifier === &quot;size&quot;) {
+            let size = this._node.size;
+            let percent = this._percent;
+            let fragment = document.createDocumentFragment();
+            let timeElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            timeElement.classList.add(&quot;size&quot;);
+            timeElement.textContent = Number.bytesToString(size);
+            let percentElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            percentElement.classList.add(&quot;percentage&quot;);
+            percentElement.textContent = Number.percentageString(percent);
+            return fragment;
+        }
+
+        if (columnIdentifier === &quot;className&quot;) {
+            let {className, id, internal} = this._node;
+            let containerElement = document.createElement(&quot;span&quot;);
+            containerElement.addEventListener(&quot;contextmenu&quot;, this._contextMenuHandler.bind(this));
+
+            let iconElement = containerElement.appendChild(document.createElement(&quot;img&quot;));
+            iconElement.classList.add(&quot;icon&quot;, WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName(className, internal));
+
+            let idElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
+            idElement.classList.add(&quot;object-id&quot;);
+            idElement.textContent = &quot;@&quot; + id + &quot; &quot;;
+
+            HeapAgent.getPreview(id, (error, string, functionDetails, objectPreviewPayload) =&gt; {
+                if (error) {
+                    let previewErrorElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
+                    previewErrorElement.classList.add(&quot;preview-error&quot;);
+                    previewErrorElement.textContent = internal ? WebInspector.UIString(&quot;Internal object&quot;) : WebInspector.UIString(&quot;No preview available&quot;);
+                    return;
+                }
+
+                if (string) {
+                    let primitiveRemoteObject = WebInspector.RemoteObject.fromPrimitiveValue(string);
+                    containerElement.appendChild(WebInspector.FormattedValue.createElementForRemoteObject(primitiveRemoteObject));
+                    return;
+                }
+
+                if (functionDetails) {
+                    let {location, name, displayName} = functionDetails;
+                    let functionNameElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
+                    functionNameElement.classList.add(&quot;function-name&quot;);
+                    functionNameElement.textContent = name || displayName || WebInspector.UIString(&quot;(anonymous function)&quot;);
+                    let sourceCode = WebInspector.debuggerManager.scriptForIdentifier(location.scriptId);
+                    if (sourceCode) {
+                        let locationElement = containerElement.appendChild(document.createElement(&quot;span&quot;));
+                        locationElement.classList.add(&quot;location&quot;);
+                        let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber);
+                        sourceCodeLocation.populateLiveDisplayLocationString(locationElement, &quot;textContent&quot;, WebInspector.SourceCodeLocation.ColumnStyle.Hidden, WebInspector.SourceCodeLocation.NameStyle.Short);
+
+                        const dontFloat = true;
+                        const useGoToArrowButton = true;
+                        let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, dontFloat, useGoToArrowButton);
+                        containerElement.appendChild(goToArrowButtonLink);
+                    }
+                    return;
+                }
+
+                if (objectPreviewPayload) {
+                    let objectPreview = WebInspector.ObjectPreview.fromPayload(objectPreviewPayload);
+                    let previewElement = WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForObjectPreview(objectPreview);
+                    containerElement.appendChild(previewElement);
+                    return;
+                }
+            });
+
+            return containerElement;
+        }
+
+        return super.createCellContent(columnIdentifier);
+    }
+
+    sort()
+    {
+        // No children to sort.
+    }
+
+    // Private
+
+    _contextMenuHandler(event)
+    {
+        let contextMenu = WebInspector.ContextMenu.createFromEvent(event);
+
+        contextMenu.appendSeparator();
+
+        contextMenu.appendItem(WebInspector.UIString(&quot;Log Value&quot;), () =&gt; {
+            let heapObjectIdentifier = this._node.id;
+            HeapAgent.getRemoteObject(heapObjectIdentifier, WebInspector.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {
+                const synthetic = true;
+                let remoteObject = error ? WebInspector.RemoteObject.fromPrimitive(undefined) : WebInspector.RemoteObject.fromPayload(remoteObjectPayload);
+                let text = WebInspector.UIString(&quot;Heap Snapshot Object (@%d)&quot;).format(heapObjectIdentifier);
+                WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, synthetic);
+            });
+        });
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstanceFetchMoreDataGridNodejs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+* Copyright (C) 2016 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+WebInspector.HeapSnapshotInstanceFetchMoreDataGridNode = class HeapSnapshotInstanceFetchMoreDataGridNode extends WebInspector.DataGridNode
+{
+    constructor(tree, batchCount, remainingCount, fetchCallback)
+    {
+        super({}, false);
+
+        console.assert(typeof batchCount === &quot;number&quot;);
+        console.assert(typeof remainingCount === &quot;number&quot;);
+        console.assert(typeof fetchCallback === &quot;function&quot;);
+
+        this._tree = tree;
+        this._batchCount = batchCount;
+        this._remainingCount = remainingCount;
+        this._fetchCallback = fetchCallback;
+    }
+
+    // Protected
+
+    createCellContent(columnIdentifier)
+    {
+        if (columnIdentifier !== &quot;className&quot;)
+            return &quot;&quot;;
+
+        let fragment = document.createDocumentFragment();
+
+        if (this._batchCount) {
+            let buttonElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+            buttonElement.classList.add(&quot;more&quot;);
+            buttonElement.textContent = WebInspector.UIString(&quot;Show %d More&quot;).format(this._batchCount);
+            buttonElement.addEventListener(&quot;click&quot;, (event) =&gt; { this._fetchCallback(this._batchCount); });
+        }
+
+        let buttonElement = fragment.appendChild(document.createElement(&quot;span&quot;));
+        buttonElement.classList.add(&quot;more&quot;);
+        buttonElement.textContent = WebInspector.UIString(&quot;Show Remaining (%d)&quot;).format(this._remainingCount);
+        buttonElement.addEventListener(&quot;click&quot;, (event) =&gt; { this._fetchCallback(this._remainingCount); });
+
+        return fragment;
+    }
+
+    sort()
+    {
+        // No children to sort.
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesContentViewcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.heap-snapshot &gt; .data-grid {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+}
+
+.heap-snapshot &gt; .data-grid td .percentage {
+    width: 45px;
+    margin-left: 4px;
+    display: inline-block;
+}
+
+.heap-snapshot &gt; .data-grid tr:not(.selected) td .object-id {
+    color: gray;
+}
+
+.heap-snapshot &gt; .data-grid tr:not(.selected) td .preview-error {
+    color: red;
+}
+
+.heap-snapshot &gt; .data-grid td .location {
+    margin-left: 1ex;
+    color: hsl(0, 0%, 60%);
+}
+
+.heap-snapshot &gt; .data-grid:matches(:focus, .force-focus) tr.selected td .location {
+    color: hsl(0, 0%, 85%);
+}
+
+.heap-snapshot &gt; .data-grid tr:matches(.selected, :hover) td .go-to-arrow {
+    float: none;
+    display: inline-block;
+    vertical-align: top;
+    position: relative;
+    width: 16px;
+    height: 16px;
+    margin-top: 1px;
+    margin-left: 2px;
+}
+
+.heap-snapshot &gt; .data-grid td .more {
+    text-decoration: underline;
+    margin-right: 1ex;
+}
+
+.heap-snapshot .icon {
+    position: relative;
+    width: 16px;
+    height: 16px;
+    margin-top: 1px;
+    margin-right: 3px;
+    content: url(../Images/TypeUndefined.svg);
+}
+
+.heap-snapshot .icon.native {
+    content: url(../Images/Native.svg);
+}
+
+.heap-snapshot .icon.boolean {
+    content: url(../Images/TypeBoolean.svg);
+}
+
+.heap-snapshot .icon.function {
+    content: url(../Images/Function.svg);
+}
+
+.heap-snapshot .icon.number {
+    content: url(../Images/TypeNumber.svg);
+}
+
+.heap-snapshot .icon.object {
+    content: url(../Images/TypeObject.svg);
+}
+
+.heap-snapshot .icon.node {
+    content: url(../Images/DOMElement.svg);
+}
+
+.heap-snapshot .icon.regex {
+    content: url(../Images/TypeRegex.svg);
+}
+
+.heap-snapshot .icon.string {
+    content: url(../Images/TypeString.svg);
+}
+
+.heap-snapshot .icon.symbol {
+    content: url(../Images/TypeSymbol.svg);
+}
+
+.heap-snapshot &gt; .data-grid td .formatted-node-preview,
+.heap-snapshot &gt; .data-grid td .object-preview {
+    text-indent: 0; /* Do not inherit the DataGrid's indent. */
+    display: inline-block;
+    height: 16px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapSnapshotInstancesContentView = class HeapSnapshotInstancesContentView extends WebInspector.ContentView
+{
+    constructor(representedObject, extraArguments)
+    {
+        console.assert(representedObject instanceof WebInspector.HeapSnapshot);
+
+        super(representedObject);
+
+        this.element.classList.add(&quot;heap-snapshot&quot;);
+
+        let {showInternalObjects} = extraArguments;
+
+        let columns = {
+            size: {
+                title: WebInspector.UIString(&quot;Total Size&quot;),
+                width: &quot;140px&quot;,
+                aligned: &quot;right&quot;,
+                sortable: true,
+            },
+            count: {
+                title: WebInspector.UIString(&quot;Count&quot;),
+                width: &quot;80px&quot;,
+                aligned: &quot;right&quot;,
+                sortable: true,
+            },
+            className: {
+                title: WebInspector.UIString(&quot;Class Name&quot;),
+                sortable: true,
+                disclosure: true,
+            }
+        };
+
+        this._dataGrid = new WebInspector.DataGrid(columns);
+        this._dataGrid.sortColumnIdentifierSetting = new WebInspector.Setting(&quot;heap-snapshot-content-view-sort&quot;, &quot;size&quot;);
+        this._dataGrid.sortOrderSetting = new WebInspector.Setting(&quot;heap-snapshot-content-view-sort-order&quot;, WebInspector.DataGrid.SortOrder.Descending);
+        this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sortDataGrid, this);
+
+        let sortComparator = WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator(this._dataGrid.sortColumnIdentifier, this._dataGrid.sortOrder);
+        this._heapSnapshotDataGridTree = new WebInspector.HeapSnapshotInstancesDataGridTree(this.representedObject, sortComparator, showInternalObjects);
+
+        for (let child of this._heapSnapshotDataGridTree.children)
+            this._dataGrid.appendChild(child);
+
+        this.addSubview(this._dataGrid);
+        this._dataGrid.updateLayout();
+    }
+
+    // Public
+
+    get showInternalObjects()
+    {
+        return this._heapSnapshotDataGridTree.includeInternalObjects;
+    }
+
+    set showInternalObjects(showInternalObjects)
+    {
+        if (this.showInternalObjects === showInternalObjects)
+            return;
+
+        this._heapSnapshotDataGridTree.includeInternalObjects = showInternalObjects;
+
+        this._sortDataGrid();
+    }
+
+    // Private
+
+    _sortDataGrid()
+    {
+        if (!this._heapSnapshotDataGridTree)
+            return;
+
+        this._heapSnapshotDataGridTree.sortComparator = WebInspector.HeapSnapshotInstancesDataGridTree.buildSortComparator(this._dataGrid.sortColumnIdentifier, this._dataGrid.sortOrder);
+
+        this._dataGrid.removeChildren();
+        for (let child of this._heapSnapshotDataGridTree.children)
+            this._dataGrid.appendChild(child);
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotInstancesDataGridTreejs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,136 @@
</span><ins>+/*
+* Copyright (C) 2016 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*    notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*    notice, this list of conditions and the following disclaimer in the
+*    documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+WebInspector.HeapSnapshotInstancesDataGridTree = class HeapSnapshotInstancesDataGridTree extends WebInspector.Object
+{
+    constructor(heapSnapshot, sortComparator, includeInternalObjects)
+    {
+        super();
+
+        console.assert(heapSnapshot instanceof WebInspector.HeapSnapshot);
+
+        this._heapSnapshot = heapSnapshot;
+
+        this._children = [];
+        this._sortComparator = sortComparator;
+        this._includeInternalObjects = includeInternalObjects;
+
+        this._populateTopLevel();
+        this.sort();
+    }
+
+    // Static
+
+    static buildSortComparator(columnIdentifier, sortOrder)
+    {
+        let multiplier = sortOrder === WebInspector.DataGrid.SortOrder.Ascending ? 1 : -1;
+        let numberCompare = (columnIdentifier, a, b) =&gt; multiplier * (a.data[columnIdentifier] - b.data[columnIdentifier]);
+        let localeCompare = (columnIdentifier, a, b) =&gt; multiplier * (a.data[columnIdentifier].localeCompare(b.data[columnIdentifier]));
+
+        let comparator;
+        switch (columnIdentifier) {
+        case &quot;size&quot;:
+            return numberCompare.bind(this, &quot;size&quot;);
+        case &quot;count&quot;:
+            return numberCompare.bind(this, &quot;count&quot;);
+        case &quot;className&quot;:
+            return localeCompare.bind(this, &quot;className&quot;);
+        }
+    }
+
+    // Public
+
+    get heapSnapshot() { return this._heapSnapshot; }
+
+    get includeInternalObjects()
+    {
+        return this._includeInternalObjects;
+    }
+
+    set includeInternalObjects(includeInternal)
+    {
+        if (this._includeInternalObjects === includeInternal)
+            return;
+
+        this._includeInternalObjects = includeInternal;
+
+        this._populateTopLevel();
+        this.sort();
+    }
+
+    get children()
+    {
+        return this._children;
+    }
+
+    appendChild(node)
+    {
+        this._children.push(node);
+    }
+
+    insertChild(node, index)
+    {
+        this._children.splice(index, 0, node);
+    }
+
+    removeChildren()
+    {
+        this._children = [];
+    }
+
+    set sortComparator(comparator)
+    {
+        this._sortComparator = comparator;
+        this.sort();
+    }
+
+    sort()
+    {
+        let children = this._children;
+        children.sort(this._sortComparator);
+
+        for (let i = 0; i &lt; children.length; ++i) {
+            children[i]._recalculateSiblings(i);
+            children[i].sort();
+        }
+    }
+
+    // Private
+
+    _populateTopLevel()
+    {
+        this.removeChildren();
+
+        // Populate the first level with the different classes.
+        let totalSize = this._heapSnapshot.totalSize;
+        for (let [className, {size, count, internalCount}] of this._heapSnapshot.categories) {
+            let allInternal = count === internalCount;
+            if (!this._includeInternalObjects &amp;&amp; allInternal)
+                continue;
+            let percent = (size / totalSize) * 100;
+            this.appendChild(new WebInspector.HeapSnapshotClassDataGridNode({className, size, count, percent, allInternal}, this));
+        }
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,174 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.content-view-container &gt; .content-view.heap-snapshot-summary {
+    overflow: scroll;
+}
+
+.heap-snapshot-summary &gt; .content {
+    width: 470px;
+    margin: 10px auto;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview {
+    padding: 10px;
+    margin-bottom: 10px;
+    border-bottom: 1px solid var(--border-color);
+}
+
+.heap-snapshot-summary &gt; .content .subtitle {
+    font-family: '-webkit-system-font';
+    font-size: 14px;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview {
+    display: flex;
+    justify-content: center;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview &gt; .chart {
+    width: 420px;
+    text-align: center;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview &gt; .chart &gt; .subtitle {
+    margin-bottom: 1em;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview &gt; .chart &gt; .container {
+    display: flex;
+    justify-content: center;
+}
+
+.heap-snapshot-summary &gt; .content &gt; .overview .total-size,
+.heap-snapshot-summary &gt; .content &gt; .overview .total-count,
+.heap-snapshot-summary &gt; .content &gt; .overview .average-allocation-size {
+    margin: auto;
+    color: hsl(0, 0%, 70%);
+}
+
+.heap-snapshot-summary .legend {
+    width: 120px;
+    padding-left: 20px;
+    text-align: left;
+}
+
+.heap-snapshot-summary .legend &gt; .row {
+    position: relative;
+    height: 27px;
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch {
+    position: absolute;
+    top: 1px;
+    left: 0;
+    width: 1em;
+    height: 1em;
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; p {
+    margin: 0;
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .label {
+    position: absolute;
+    top: 0;
+    left: 20px;
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .size {
+    position: absolute;
+    top: 12px;
+    left: 20px;
+    color: hsl(0, 0%, 70%);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.top-class-1,
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.small {
+    border: 1px solid var(--memory-javascript-stroke-color);
+    background: var(--memory-javascript-fill-color);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.top-class-2,
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.medium {
+    border: 1px solid var(--memory-images-stroke-color);
+    background: var(--memory-images-fill-color);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.top-class-3,
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.large {
+    border: 1px solid var(--memory-layers-stroke-color);
+    background: var(--memory-layers-fill-color);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.top-class-4,
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.very-large {
+    border: 1px solid var(--memory-page-stroke-color);
+    background: var(--memory-page-fill-color);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.top-class-5 {
+    border: 1px solid var(--memory-extra-stroke-color);
+    background: var(--memory-extra-fill-color);
+}
+
+.heap-snapshot-summary .legend &gt; .row &gt; .swatch.other {
+    border: 1px solid var(--memory-max-comparison-stroke-color);
+    background: var(--memory-max-comparison-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.top-class-1,
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.small {
+    stroke: var(--memory-javascript-stroke-color);
+    fill: var(--memory-javascript-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.top-class-2,
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.medium {
+    stroke: var(--memory-images-stroke-color);
+    fill: var(--memory-images-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.top-class-3,
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.large {
+    stroke: var(--memory-layers-stroke-color);
+    fill: var(--memory-layers-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.top-class-4,
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.very-large {
+    stroke: var(--memory-page-stroke-color);
+    fill: var(--memory-page-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.top-class-5 {
+    stroke: var(--memory-extra-stroke-color);
+    fill: var(--memory-extra-fill-color);
+}
+
+.heap-snapshot-summary .circle-chart &gt; svg &gt; path.other {
+    stroke: var(--memory-max-comparison-stroke-color);
+    fill: var(--memory-max-comparison-fill-color);
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsHeapSnapshotSummaryContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotSummaryContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,234 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.HeapSnapshotSummaryContentView = class HeapSnapshotSummaryContentView extends WebInspector.ContentView
+{
+    constructor(heapSnapshot, extraArguments)
+    {
+        console.assert(heapSnapshot instanceof WebInspector.HeapSnapshot);
+
+        super(heapSnapshot);
+
+        this._heapSnapshot = heapSnapshot;
+
+        // FIXME: Show/hide internal objects.
+        let {showInternalObjects} = extraArguments;
+
+        this.element.classList.add(&quot;heap-snapshot-summary&quot;);
+
+        let contentElement = this.element.appendChild(document.createElement(&quot;div&quot;));
+        contentElement.classList.add(&quot;content&quot;);
+
+        let overviewElement = contentElement.appendChild(document.createElement(&quot;div&quot;));
+        overviewElement.classList.add(&quot;overview&quot;);
+
+        function createChartContainer(parentElement, subtitle, tooltip)
+        {
+            let chartElement = parentElement.appendChild(document.createElement(&quot;div&quot;));
+            chartElement.classList.add(&quot;chart&quot;);
+
+            let chartSubtitleElement = chartElement.appendChild(document.createElement(&quot;div&quot;));
+            chartSubtitleElement.classList.add(&quot;subtitle&quot;);
+            chartSubtitleElement.textContent = subtitle;
+            chartSubtitleElement.title = tooltip;
+
+            let chartFlexContainerElement = chartElement.appendChild(document.createElement(&quot;div&quot;));
+            chartFlexContainerElement.classList.add(&quot;container&quot;);
+            return chartFlexContainerElement;
+        }
+
+        const circleChartConfig = {size: 120, innerRadiusRatio: 0.5};
+
+        let classSizeBreakdownTooltip = WebInspector.UIString(&quot;Breakdown of total allocation size by class&quot;);
+        let classSizeBreakdownChartContainerElement = createChartContainer(overviewElement, WebInspector.UIString(&quot;Class Size Breakdown&quot;), classSizeBreakdownTooltip);
+        this._classSizeBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
+        classSizeBreakdownChartContainerElement.appendChild(this._classSizeBreakdownCircleChart.element);
+        this._classSizeBreakdownLegendElement = classSizeBreakdownChartContainerElement.appendChild(document.createElement(&quot;div&quot;));
+        this._classSizeBreakdownLegendElement.classList.add(&quot;legend&quot;, &quot;class-breakdown&quot;);
+
+        let secondOverviewElement = contentElement.appendChild(document.createElement(&quot;div&quot;));
+        secondOverviewElement.classList.add(&quot;overview&quot;);
+
+        let classCountBreakdownTooltip = WebInspector.UIString(&quot;Breakdown of object counts by class&quot;);
+        let classCountBreakdownChartContainerElement = createChartContainer(secondOverviewElement, WebInspector.UIString(&quot;Class Count Breakdown&quot;), classCountBreakdownTooltip);
+        this._classCountBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
+        classCountBreakdownChartContainerElement.appendChild(this._classCountBreakdownCircleChart.element);
+        this._classCountBreakdownLegendElement = classCountBreakdownChartContainerElement.appendChild(document.createElement(&quot;div&quot;));
+        this._classCountBreakdownLegendElement.classList.add(&quot;legend&quot;, &quot;count-breakdown&quot;);
+
+        let thirdOverviewElement = contentElement.appendChild(document.createElement(&quot;div&quot;));
+        thirdOverviewElement.classList.add(&quot;overview&quot;);
+
+        let allocationSizeBreakdownTooltip = WebInspector.UIString(&quot;Breakdown of allocations into size classes&quot;);
+        let allocationSizeBreakdownChartContainerElement = createChartContainer(thirdOverviewElement, WebInspector.UIString(&quot;Allocation Size Breakdown&quot;), allocationSizeBreakdownTooltip);
+        this._allocationSizeBreakdownCircleChart = new WebInspector.CircleChart(circleChartConfig);
+        allocationSizeBreakdownChartContainerElement.appendChild(this._allocationSizeBreakdownCircleChart.element);
+        this._allocationSizeBreakdownLegendElement = allocationSizeBreakdownChartContainerElement.appendChild(document.createElement(&quot;div&quot;));
+        this._allocationSizeBreakdownLegendElement.classList.add(&quot;legend&quot;, &quot;allocation-size-breakdown&quot;);
+
+        function appendLegendRow(legendElement, swatchClass, label, subtitle, tooltip) {
+            let rowElement = legendElement.appendChild(document.createElement(&quot;div&quot;));
+            rowElement.classList.add(&quot;row&quot;);
+            let swatchElement = rowElement.appendChild(document.createElement(&quot;div&quot;));
+            swatchElement.classList.add(&quot;swatch&quot;, swatchClass);
+            let labelElement = rowElement.appendChild(document.createElement(&quot;p&quot;));
+            labelElement.classList.add(&quot;label&quot;);
+            labelElement.textContent = label;
+            let sizeElement = rowElement.appendChild(document.createElement(&quot;p&quot;));
+            sizeElement.classList.add(&quot;size&quot;);
+            sizeElement.textContent = subtitle;
+            if (tooltip)
+                rowElement.title = tooltip;
+        }
+
+        function appendEmptyMessage(legendElement, text) {
+            let emptyElement = legendElement.appendChild(document.createElement(&quot;div&quot;));
+            emptyElement.classList.add(&quot;empty&quot;);
+            emptyElement.textContent = text;
+        }
+
+        // Largest classes by size.
+        let categoriesBySize = [...this._heapSnapshot.categories.values()].sort((a, b) =&gt; b.size - a.size);
+        let categoriesBySizeLimit = Math.min(categoriesBySize.length, 5);
+        if (categoriesBySizeLimit) {
+            let topClassSizes = categoriesBySize.splice(0, categoriesBySizeLimit);
+            let otherClassSize = categoriesBySize.reduce((sum, category) =&gt; sum += category.size, 0);
+
+            let segments = [];
+            let values = [];
+
+            for (let i = 0; i &lt; categoriesBySizeLimit; ++i) {
+                let topClassSize = topClassSizes[i];
+                let segmentName = &quot;top-class-&quot; + (i + 1);
+                segments.push(segmentName);
+                values.push(topClassSize.size);
+                appendLegendRow.call(this, this._classSizeBreakdownLegendElement, segmentName, topClassSize.className, Number.bytesToString(topClassSize.size));
+            }
+
+            if (otherClassSize) {
+                let otherSegmentName = &quot;other&quot;;
+                segments.push(otherSegmentName);
+                values.push(otherClassSize);
+                appendLegendRow.call(this, this._classSizeBreakdownLegendElement, otherSegmentName, WebInspector.UIString(&quot;Other&quot;), Number.bytesToString(otherClassSize));
+            }
+
+            this._classSizeBreakdownCircleChart.segments = segments;
+            this._classSizeBreakdownCircleChart.values = values;
+            this._classSizeBreakdownCircleChart.updateLayout();
+
+            let totalSizeElement = this._classSizeBreakdownCircleChart.centerElement.appendChild(document.createElement(&quot;div&quot;));
+            totalSizeElement.classList.add(&quot;total-size&quot;);
+            totalSizeElement.appendChild(document.createElement(&quot;span&quot;)); // firstChild
+            totalSizeElement.appendChild(document.createElement(&quot;br&quot;));
+            totalSizeElement.appendChild(document.createElement(&quot;span&quot;)); // lastChild
+            let totalSize = Number.bytesToString(this._heapSnapshot.totalSize).split(/\s+/);
+            totalSizeElement.firstChild.textContent = totalSize[0];
+            totalSizeElement.lastChild.textContent = totalSize[1];
+            totalSizeElement.title = WebInspector.UIString(&quot;Total size of heap&quot;);
+        } else
+            appendEmptyMessage.call(this, this._classSizeBreakdownLegendElement, WebInspector.UIString(&quot;No objects&quot;));
+
+        // Largest classes by count.
+        let categoriesByCount = [...this._heapSnapshot.categories.values()].sort((a, b) =&gt; b.count - a.count);
+        let categoriesByCountLimit = Math.min(categoriesByCount.length, 5);
+        if (categoriesByCountLimit) {
+            let topClassCounts = categoriesByCount.splice(0, categoriesByCountLimit);
+            let otherClassCount = categoriesByCount.reduce((sum, category) =&gt; sum += category.count, 0);
+
+            let segments = [];
+            let values = [];
+
+            for (let i = 0; i &lt; categoriesByCountLimit; ++i) {
+                let topClassCount = topClassCounts[i];
+                let segmentName = &quot;top-class-&quot; + (i + 1);
+                segments.push(segmentName);
+                values.push(topClassCount.count);
+                appendLegendRow.call(this, this._classCountBreakdownLegendElement, segmentName, topClassCount.className, topClassCount.count);
+            }
+
+            if (otherClassCount) {
+                let otherSegmentName = &quot;other&quot;;
+                segments.push(otherSegmentName);
+                values.push(otherClassCount);
+                appendLegendRow.call(this, this._classCountBreakdownLegendElement, otherSegmentName, WebInspector.UIString(&quot;Other&quot;), otherClassCount);
+            }
+
+            this._classCountBreakdownCircleChart.segments = segments;
+            this._classCountBreakdownCircleChart.values = values;
+            this._classCountBreakdownCircleChart.updateLayout();
+
+            let totalCountElement = this._classCountBreakdownCircleChart.centerElement.appendChild(document.createElement(&quot;div&quot;));
+            totalCountElement.classList.add(&quot;total-count&quot;);
+            totalCountElement.textContent = this._heapSnapshot.totalObjectCount;
+            totalCountElement.title = WebInspector.UIString(&quot;Total object count&quot;);
+        } else
+            appendEmptyMessage.call(this, this._classCountBreakdownLegendElement, WebInspector.UIString(&quot;No objects&quot;));
+
+        // Allocation size groups.
+        let small = 0;
+        let medium = 0;
+        let large = 0;
+        let veryLarge = 0;
+
+        const smallAllocationSize = 48;
+        const mediumAllocationSize = 128;
+        const largeAllocationSize = 512;
+
+        this._heapSnapshot.instances.forEach(({size}) =&gt; {
+            if (size &lt; smallAllocationSize)
+                small++;
+            else if (size &lt; mediumAllocationSize)
+                medium++;
+            else if (size &lt; largeAllocationSize)
+                large++;
+            else
+                veryLarge++;
+        });
+
+        if (small + medium + large + veryLarge) {
+            appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, &quot;small&quot;, WebInspector.UIString(&quot;Small %s&quot;).format(Number.bytesToString(smallAllocationSize)), small);
+            appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, &quot;medium&quot;, WebInspector.UIString(&quot;Medium %s&quot;).format(Number.bytesToString(mediumAllocationSize)), medium);
+            appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, &quot;large&quot;, WebInspector.UIString(&quot;Large %s&quot;).format(Number.bytesToString(largeAllocationSize)), large);
+            appendLegendRow.call(this, this._allocationSizeBreakdownLegendElement, &quot;very-large&quot;, WebInspector.UIString(&quot;Very Large&quot;), veryLarge);
+
+            this._allocationSizeBreakdownCircleChart.segments = [&quot;small&quot;, &quot;medium&quot;, &quot;large&quot;, &quot;very-large&quot;];
+            this._allocationSizeBreakdownCircleChart.values = [small, medium, large, veryLarge];
+            this._allocationSizeBreakdownCircleChart.updateLayout();
+
+            let averageAllocationSizeElement = this._allocationSizeBreakdownCircleChart.centerElement.appendChild(document.createElement(&quot;div&quot;));
+            averageAllocationSizeElement.classList.add(&quot;average-allocation-size&quot;);
+            averageAllocationSizeElement.textContent = Number.bytesToString(this._heapSnapshot.totalSize / this._heapSnapshot.totalObjectCount);
+            averageAllocationSizeElement.title = WebInspector.UIString(&quot;Average allocation size&quot;);
+        } else
+            appendEmptyMessage.call(this, this._allocationSizeBreakdownLegendElement, WebInspector.UIString(&quot;No objects&quot;));
+    }
+
+    // Protected
+
+    layout()
+    {
+        // Nothing to change.
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsPathComponentIconscss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -31,6 +31,14 @@
</span><span class="cx">     content: url(../Images/Response.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.heap-snapshot-summary-icon .icon {
+    content: url(../Images/HeapSnapshotSummary.svg);
+}
+
+.heap-snapshot-instances-icon .icon {
+    content: url(../Images/HeapSnapshotInstances.svg);
+}
+
</ins><span class="cx"> .dom-element-icon .icon {
</span><span class="cx">     content: url(../Images/DOMElement.svg);
</span><span class="cx"> }
</span><span class="lines">@@ -83,8 +91,22 @@
</span><span class="cx">     content: url(../Images/CallTrees.svg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.snapshot-list-icon .icon {
+    content: url(../Images/Events.svg);
+}
+
+.snapshot-diff-icon .icon {
+    content: url(../Images/HeapSnapshotDiff.svg);
+}
+
</ins><span class="cx"> /* FIXME: &lt;https://webkit.org/b/155077&gt; [GTK] Web Inspector: Add new GTK+ icons for different Script Timeline Views */
</span><ins>+/* FIXME: &lt;https://webkit.org/b/155282&gt; [GTK] Web Inspector: Add new GTK+ icons for different Heap Allocations Timeline Views (Heap Snapshots) */
</ins><span class="cx"> body:not(.mac-platform, .windows-platform) .events-icon .icon,
</span><del>-body:not(.mac-platform, .windows-platform) .call-trees-icon .icon {
</del><ins>+body:not(.mac-platform, .windows-platform) .call-trees-icon .icon,
+body:not(.mac-platform, .windows-platform) .heap-snapshot-record .icon,
+body:not(.mac-platform, .windows-platform) .heap-snapshot-summary-icon .icon,
+body:not(.mac-platform, .windows-platform) .heap-snapshot-instances-icon .icon,
+body:not(.mac-platform, .windows-platform) .snapshot-list-icon .icon,
+body:not(.mac-platform, .windows-platform) .snapshot-diff-icon .icon {
</ins><span class="cx">     content: url(../Images/ResultLine.svg);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTextNavigationItemcssfromrev197953trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.css (from rev 197953, trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js) (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.navigation-bar .item.text {
+    width: auto;
+    padding: 1px 8px 3px;
+    margin: 0 2px;
+
+    line-height: 11px;
+    color: hsl(0, 0%, 18%);
+    text-align: center;
+    height: auto;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTextNavigationItemjsfromrev197953trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.js (from rev 197953, trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js) (0 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextNavigationItem.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.TextNavigationItem = class TextNavigationItem extends WebInspector.NavigationItem
+{
+    constructor(identifier, label)
+    {
+        super(identifier);
+
+        console.assert(identifier);
+
+        this._element.classList.add(&quot;text&quot;);
+        this._element.textContent = label || &quot;&quot;;
+    }
+
+    // Public
+
+    get text()
+    {
+        return this._element.textContent;
+    }
+
+    set text(x)
+    {
+        this._element.textContent = x || &quot;&quot;;
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineIconscss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineIcons.css (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineIcons.css        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineIcons.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -142,3 +142,7 @@
</span><span class="cx"> .animation-record .icon {
</span><span class="cx">     content: url(../Images/TimelineRecordAnimation.svg);
</span><span class="cx"> }
</span><ins>+
+.heap-snapshot-record .icon {
+    content: url(../Images/HeapSnapshot.svg);
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.TimelineOverview = class TimelineOverview extends WebInspector.View
</span><span class="cx"> {
</span><del>-    constructor(timelineRecording)
</del><ins>+    constructor(timelineRecording, delegate)
</ins><span class="cx">     {
</span><span class="cx">         super();
</span><span class="cx"> 
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx">         this._recording.addEventListener(WebInspector.TimelineRecording.Event.MarkerAdded, this._markerAdded, this);
</span><span class="cx">         this._recording.addEventListener(WebInspector.TimelineRecording.Event.Reset, this._recordingReset, this);
</span><span class="cx"> 
</span><ins>+        this._delegate = delegate;
+
</ins><span class="cx">         this.element.classList.add(&quot;timeline-overview&quot;);
</span><span class="cx">         this.element.addEventListener(&quot;wheel&quot;, this._handleWheelEvent.bind(this));
</span><span class="cx">         this.element.addEventListener(&quot;gesturestart&quot;, this._handleGestureStart.bind(this));
</span><span class="lines">@@ -376,6 +378,12 @@
</span><span class="cx">         overviewGraph.selectedRecord = record;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    userSelectedRecord(record)
+    {
+        if (this._delegate &amp;&amp; this._delegate.timelineOverviewUserSelectedRecord)
+            this._delegate.timelineOverviewUserSelectedRecord(this, record);
+    }
+
</ins><span class="cx">     updateLayoutIfNeeded()
</span><span class="cx">     {
</span><span class="cx">         if (this.layoutPending) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -65,6 +65,9 @@
</span><span class="cx">         if (timelineType === WebInspector.TimelineRecord.Type.Memory)
</span><span class="cx">             return new WebInspector.MemoryTimelineOverviewGraph(timeline, timelineOverview);
</span><span class="cx"> 
</span><ins>+        if (timelineType === WebInspector.TimelineRecord.Type.HeapAllocations)
+            return new WebInspector.HeapAllocationsTimelineOverviewGraph(timeline, timelineOverview);
+
</ins><span class="cx">         throw new Error(&quot;Can't make a graph for an unknown timeline.&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx">         this.element.classList.add(&quot;timeline-recording&quot;);
</span><span class="cx"> 
</span><del>-        this._timelineOverview = new WebInspector.TimelineOverview(this._recording);
</del><ins>+        this._timelineOverview = new WebInspector.TimelineOverview(this._recording, this);
</ins><span class="cx">         this._timelineOverview.addEventListener(WebInspector.TimelineOverview.Event.TimeRangeSelectionChanged, this._timeRangeSelectionChanged, this);
</span><span class="cx">         this._timelineOverview.addEventListener(WebInspector.TimelineOverview.Event.RecordSelected, this._recordSelected, this);
</span><span class="cx">         this._timelineOverview.addEventListener(WebInspector.TimelineOverview.Event.TimelineSelected, this._timelineSelected, this);
</span><span class="lines">@@ -351,6 +351,25 @@
</span><span class="cx">         return new WebInspector.GeneralTreeElement(iconClassName, title, representedObject, hasChildren);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // TimelineOverview delegate
+
+    timelineOverviewUserSelectedRecord(timelineOverview, timelineRecord)
+    {
+        let timelineViewForRecord = null;
+        for (let timelineView of this._timelineViewMap.values()) {
+            if (timelineView.representedObject.type === timelineRecord.type) {
+                timelineViewForRecord = timelineView;
+                break;
+            }
+        }
+
+        if (!timelineViewForRecord)
+            return;
+
+        this._timelineContentBrowser.showContentView(timelineViewForRecord);
+        timelineViewForRecord.userSelectedRecordFromOverview(timelineRecord);
+    }
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _currentContentViewDidChange(event)
</span><span class="lines">@@ -364,7 +383,7 @@
</span><span class="cx"> 
</span><span class="cx">         this._timelineOverview.viewMode = newViewMode;
</span><span class="cx"> 
</span><del>-        if (timelineView) {
</del><ins>+        if (timelineView instanceof WebInspector.TimelineView) {
</ins><span class="cx">             this._timelineSidebarPanel.contentTreeOutline = timelineView.navigationSidebarTreeOutline;
</span><span class="cx">             this._timelineSidebarPanel.contentTreeOutlineLabel = timelineView.navigationSidebarTreeOutlineLabel;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRulerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -105,8 +105,10 @@
</span><span class="cx">         this._allowsTimeRangeSelection = x;
</span><span class="cx"> 
</span><span class="cx">         if (x) {
</span><ins>+            this._clickEventListener = this._handleClick.bind(this);
</ins><span class="cx">             this._doubleClickEventListener = this._handleDoubleClick.bind(this);
</span><span class="cx">             this._mouseDownEventListener = this._handleMouseDown.bind(this);
</span><ins>+            this.element.addEventListener(&quot;click&quot;, this._clickEventListener);
</ins><span class="cx">             this.element.addEventListener(&quot;dblclick&quot;, this._doubleClickEventListener);
</span><span class="cx">             this.element.addEventListener(&quot;mousedown&quot;, this._mouseDownEventListener);
</span><span class="cx"> 
</span><span class="lines">@@ -133,8 +135,10 @@
</span><span class="cx"> 
</span><span class="cx">             this._needsSelectionLayout();
</span><span class="cx">         } else {
</span><ins>+            this.element.removeEventListener(&quot;click&quot;, this._clickEventListener);
</ins><span class="cx">             this.element.removeEventListener(&quot;dblclick&quot;, this._doubleClickEventListener);
</span><span class="cx">             this.element.removeEventListener(&quot;mousedown&quot;, this._mouseDownEventListener);
</span><ins>+            this._clickEventListener = null;
</ins><span class="cx">             this._doubleClickEventListener = null;
</span><span class="cx">             this._mouseDownEventListener = null;
</span><span class="cx"> 
</span><span class="lines">@@ -694,6 +698,19 @@
</span><span class="cx">         this._needsMarkerLayout();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    _handleClick(event)
+    {
+        if (this._mouseMoved)
+            return;
+
+        this.element.style.pointerEvents = &quot;none&quot;;
+        let newTarget = document.elementFromPoint(event.pageX, event.pageY);
+        this.element.style.pointerEvents = &quot;all&quot;;
+
+        if (newTarget &amp;&amp; newTarget.click)
+            newTarget.click();
+    }
+
</ins><span class="cx">     _handleDoubleClick(event)
</span><span class="cx">     {
</span><span class="cx">         if (this.entireRangeSelected)
</span><span class="lines">@@ -719,6 +736,8 @@
</span><span class="cx">         } else
</span><span class="cx">             this._mouseDownPosition = event.pageX - this._rulerBoundingClientRect.left;
</span><span class="cx"> 
</span><ins>+        this._mouseMoved = false;
+
</ins><span class="cx">         this._mouseMoveEventListener = this._handleMouseMove.bind(this);
</span><span class="cx">         this._mouseUpEventListener = this._handleMouseUp.bind(this);
</span><span class="cx"> 
</span><span class="lines">@@ -734,6 +753,8 @@
</span><span class="cx">     {
</span><span class="cx">         console.assert(event.button === 0);
</span><span class="cx"> 
</span><ins>+        this._mouseMoved = true;
+
</ins><span class="cx">         let currentMousePosition;
</span><span class="cx">         if (this._selectionIsMove) {
</span><span class="cx">             currentMousePosition = Math.max(this._moveSelectionMaximumLeftOffset, Math.min(this._moveSelectionMaximumRightOffset, event.pageX));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -122,6 +122,8 @@
</span><span class="cx">             return WebInspector.UIString(&quot;Rendering Frames&quot;);
</span><span class="cx">         case WebInspector.TimelineRecord.Type.Memory:
</span><span class="cx">             return WebInspector.UIString(&quot;Memory&quot;);
</span><ins>+        case WebInspector.TimelineRecord.Type.HeapAllocations:
+            return WebInspector.UIString(&quot;JavaScript Allocations&quot;);
</ins><span class="cx">         default:
</span><span class="cx">             console.error(&quot;Unknown Timeline type:&quot;, timeline.type);
</span><span class="cx">         }
</span><span class="lines">@@ -138,6 +140,9 @@
</span><span class="cx">             return &quot;layout-icon&quot;;
</span><span class="cx">         case WebInspector.TimelineRecord.Type.Memory:
</span><span class="cx">             return &quot;memory-icon&quot;;
</span><ins>+        case WebInspector.TimelineRecord.Type.HeapAllocations:
+            // FIXME: HeapAllocation Timeline needs a new icon.
+            return &quot;memory-icon&quot;;
</ins><span class="cx">         case WebInspector.TimelineRecord.Type.Script:
</span><span class="cx">             return &quot;script-icon&quot;;
</span><span class="cx">         case WebInspector.TimelineRecord.Type.RenderingFrame:
</span><span class="lines">@@ -158,6 +163,8 @@
</span><span class="cx">             return &quot;colors&quot;;
</span><span class="cx">         case WebInspector.TimelineRecord.Type.Memory:
</span><span class="cx">             return &quot;memory&quot;;
</span><ins>+        case WebInspector.TimelineRecord.Type.HeapAllocations:
+            return &quot;heap-allocations&quot;;
</ins><span class="cx">         case WebInspector.TimelineRecord.Type.Script:
</span><span class="cx">             return &quot;script&quot;;
</span><span class="cx">         case WebInspector.TimelineRecord.Type.RenderingFrame:
</span><span class="lines">@@ -224,6 +231,9 @@
</span><span class="cx">         case WebInspector.TimelineRecord.Type.RenderingFrame:
</span><span class="cx">             return WebInspector.TimelineRecordTreeElement.RenderingFrameRecordIconStyleClass;
</span><span class="cx"> 
</span><ins>+        case WebInspector.TimelineRecord.Type.HeapAllocations:
+            return &quot;heap-snapshot-record&quot;;
+
</ins><span class="cx">         case WebInspector.TimelineRecord.Type.Memory:
</span><span class="cx">             // Not used. Fall through to error just in case.
</span><span class="cx"> 
</span><span class="lines">@@ -245,6 +255,8 @@
</span><span class="cx">             return WebInspector.ScriptTimelineRecord.EventType.displayName(timelineRecord.eventType, timelineRecord.details, includeDetailsInMainTitle);
</span><span class="cx">         case WebInspector.TimelineRecord.Type.RenderingFrame:
</span><span class="cx">             return WebInspector.UIString(&quot;Frame %d&quot;).format(timelineRecord.frameNumber);
</span><ins>+        case WebInspector.TimelineRecord.Type.HeapAllocations:
+            return WebInspector.UIString(&quot;Snapshot %d&quot;).format(timelineRecord.heapSnapshot.identifier);
</ins><span class="cx">         case WebInspector.TimelineRecord.Type.Memory:
</span><span class="cx">             // Not used. Fall through to error just in case.
</span><span class="cx">         default:
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -245,6 +245,11 @@
</span><span class="cx">         this.showContentViewForTreeElement(treeElement);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    userSelectedRecordFromOverview(timelineRecord)
+    {
+        // Implemented by sub-classes if needed.
+    }
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _treeSelectionDidChange(event)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVariablescss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css (197953 => 197954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css        2016-03-10 21:35:10 UTC (rev 197953)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css        2016-03-10 21:37:56 UTC (rev 197954)
</span><span class="lines">@@ -67,6 +67,8 @@
</span><span class="cx">     --memory-page-stroke-color: hsl(22, 40%, 50%);
</span><span class="cx">     --memory-max-comparison-fill-color: hsl(220, 10%, 75%);
</span><span class="cx">     --memory-max-comparison-stroke-color: hsl(220, 10%, 55%);
</span><ins>+    --memory-extra-fill-color: hsl(211, 53%, 70%);
+    --memory-extra-stroke-color: hsl(211, 53%, 55%);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> body.window-inactive {
</span></span></pre>
</div>
</div>

</body>
</html>