<!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>[162415] trunk/Source/WebInspectorUI</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/162415">162415</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2014-01-20 18:55:52 -0800 (Mon, 20 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement the discrete Network timeline view.

https://bugs.webkit.org/show_bug.cgi?id=127022

Reviewed by Joseph Pecoraro.

* UserInterface/DataGrid.js:
(WebInspector.DataGrid): Align the labels of the column headers to match the data.
(WebInspector.DataGridNode.prototype.get selectable): Prevent selection when hidden.

* UserInterface/DetailsSection.css:
(.details-section &gt; .header): Bump the font size to match data grid header sizes.

* UserInterface/Main.html: Add new files.

* UserInterface/NetworkTimelineView.css: Added.
(.timeline-view.network &gt; .data-grid):
(.sidebar &gt; .panel.timeline.timeline-content-view-showing &gt; .content .item.resource .subtitle):
Hide the domain subtitle when the content view is showing which also has the domain.

* UserInterface/NetworkTimelineView.js: Added.
(WebInspector.NetworkTimelineView):
(WebInspector.NetworkTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.NetworkTimelineView.prototype.shown):
(WebInspector.NetworkTimelineView.prototype.hidden):
(WebInspector.NetworkTimelineView.prototype.updateLayout):
(WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.NetworkTimelineView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.NetworkTimelineView.prototype._treeElementSelected):

* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh):
Call dataGridNodeNeedsRefresh on the TimelineDataGrid so things can be batched with
one request animation frame.

* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView): Create a NetworkTimelineView.
(WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):

* UserInterface/TimelineDataGrid.css:
(.data-grid.timeline table):
(.data-grid.timeline th):
(.data-grid.timeline th:not(:last-child)):
(.data-grid.timeline th.sortable:active):
(.data-grid.timeline th.sort-descending):
(.data-grid.timeline .data-container):
(.data-grid.timeline td):
(.data-grid.timeline td:last-child):
(.data-grid.timeline td:not(:last-child)):
(.data-grid.timeline:focus tr.selected td:not(:last-child)):
(.data-grid.timeline th.sort-descending &gt; div:first-child):
(.data-grid.timeline th.sort-descending &gt; div:first-child::after):
(.data-grid.timeline td.error):
(.data-grid.timeline tr.selected td.error):
(.data-grid.timeline &gt; .navigation-bar-container):
(.data-grid.timeline:hover &gt; .navigation-bar-container):
(.data-grid.timeline &gt; .navigation-bar-container &gt; .navigation-bar):

* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.createColumnScopeBar):
(WebInspector.TimelineDataGrid.prototype.reset):
(WebInspector.TimelineDataGrid.prototype.shown):
(WebInspector.TimelineDataGrid.prototype.hidden):
(WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.TimelineDataGrid.prototype.updateLayout):
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
(WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
(WebInspector.TimelineDataGrid.prototype.shouldIgnoreSelectionEvent):
(WebInspector.TimelineDataGrid.prototype.dataGridNodeNeedsRefresh):
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
(WebInspector.TimelineDataGrid.prototype._sort):
(WebInspector.TimelineDataGrid.prototype._sortComparator):
Add support for sorting, batch refresh and managing of a TreeOutlineDataGridSynchronizer.

* UserInterface/TimelineSidebarPanel.css:
(.sidebar &gt; .panel.timeline &gt; .title-bar): Bump the font size to match data grid header sizes.

* UserInterface/TimelineView.js:
(WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Added stub.

* UserInterface/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.get treeOutline):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.get dataGrid):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.get enabled):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.set enabled):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.treeElementForDataGridNode):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype.dataGridNodeForTreeElement):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeSelected):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeExpanded):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeCollapsed):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged):
Added support for disabling the synchronizer when the client can do a better job.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceDataGridjs">trunk/Source/WebInspectorUI/UserInterface/DataGrid.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceDetailsSectioncss">trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceResourceTimelineDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/ResourceTimelineDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTimelineContentViewjs">trunk/Source/WebInspectorUI/UserInterface/TimelineContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTimelineDataGridcss">trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTimelineDataGridjs">trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTimelineSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/TimelineSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/TimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceTreeOutlineDataGridSynchronizerjs">trunk/Source/WebInspectorUI/UserInterface/TreeOutlineDataGridSynchronizer.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceNetworkTimelineViewcss">trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceNetworkTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -1,3 +1,107 @@
</span><ins>+2014-01-14  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Implement the discrete Network timeline view.
+
+        https://bugs.webkit.org/show_bug.cgi?id=127022
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/DataGrid.js:
+        (WebInspector.DataGrid): Align the labels of the column headers to match the data.
+        (WebInspector.DataGridNode.prototype.get selectable): Prevent selection when hidden.
+
+        * UserInterface/DetailsSection.css:
+        (.details-section &gt; .header): Bump the font size to match data grid header sizes.
+
+        * UserInterface/Main.html: Add new files.
+
+        * UserInterface/NetworkTimelineView.css: Added.
+        (.timeline-view.network &gt; .data-grid):
+        (.sidebar &gt; .panel.timeline.timeline-content-view-showing &gt; .content .item.resource .subtitle):
+        Hide the domain subtitle when the content view is showing which also has the domain.
+
+        * UserInterface/NetworkTimelineView.js: Added.
+        (WebInspector.NetworkTimelineView):
+        (WebInspector.NetworkTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
+        (WebInspector.NetworkTimelineView.prototype.shown):
+        (WebInspector.NetworkTimelineView.prototype.hidden):
+        (WebInspector.NetworkTimelineView.prototype.updateLayout):
+        (WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters):
+        (WebInspector.NetworkTimelineView.prototype._networkTimelineRecordAdded):
+        (WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
+        (WebInspector.NetworkTimelineView.prototype._treeElementSelected):
+
+        * UserInterface/ResourceTimelineDataGridNode.js:
+        (WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh):
+        Call dataGridNodeNeedsRefresh on the TimelineDataGrid so things can be batched with
+        one request animation frame.
+
+        * UserInterface/TimelineContentView.js:
+        (WebInspector.TimelineContentView): Create a NetworkTimelineView.
+        (WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):
+
+        * UserInterface/TimelineDataGrid.css:
+        (.data-grid.timeline table):
+        (.data-grid.timeline th):
+        (.data-grid.timeline th:not(:last-child)):
+        (.data-grid.timeline th.sortable:active):
+        (.data-grid.timeline th.sort-descending):
+        (.data-grid.timeline .data-container):
+        (.data-grid.timeline td):
+        (.data-grid.timeline td:last-child):
+        (.data-grid.timeline td:not(:last-child)):
+        (.data-grid.timeline:focus tr.selected td:not(:last-child)):
+        (.data-grid.timeline th.sort-descending &gt; div:first-child):
+        (.data-grid.timeline th.sort-descending &gt; div:first-child::after):
+        (.data-grid.timeline td.error):
+        (.data-grid.timeline tr.selected td.error):
+        (.data-grid.timeline &gt; .navigation-bar-container):
+        (.data-grid.timeline:hover &gt; .navigation-bar-container):
+        (.data-grid.timeline &gt; .navigation-bar-container &gt; .navigation-bar):
+
+        * UserInterface/TimelineDataGrid.js:
+        (WebInspector.TimelineDataGrid):
+        (WebInspector.TimelineDataGrid.createColumnScopeBar):
+        (WebInspector.TimelineDataGrid.prototype.reset):
+        (WebInspector.TimelineDataGrid.prototype.shown):
+        (WebInspector.TimelineDataGrid.prototype.hidden):
+        (WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
+        (WebInspector.TimelineDataGrid.prototype.updateLayout):
+        (WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
+        (WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
+        (WebInspector.TimelineDataGrid.prototype.shouldIgnoreSelectionEvent):
+        (WebInspector.TimelineDataGrid.prototype.dataGridNodeNeedsRefresh):
+        (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
+        (WebInspector.TimelineDataGrid.prototype._sort):
+        (WebInspector.TimelineDataGrid.prototype._sortComparator):
+        Add support for sorting, batch refresh and managing of a TreeOutlineDataGridSynchronizer.
+
+        * UserInterface/TimelineSidebarPanel.css:
+        (.sidebar &gt; .panel.timeline &gt; .title-bar): Bump the font size to match data grid header sizes.
+
+        * UserInterface/TimelineView.js:
+        (WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Added stub.
+
+        * UserInterface/TreeOutlineDataGridSynchronizer.js:
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get treeOutline):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get dataGrid):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get enabled):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.set enabled):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.treeElementForDataGridNode):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype.dataGridNodeForTreeElement):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeSelected):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeExpanded):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeCollapsed):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed):
+        (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged):
+        Added support for disabling the synchronizer when the client can do a better job.
+
</ins><span class="cx"> 2014-01-13  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Filter the Timeline overview graph and sidebar based on the current time selection.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DataGrid.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DataGrid.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/DataGrid.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -87,6 +87,8 @@
</span><span class="cx">         var cell = document.createElement(&quot;th&quot;);
</span><span class="cx">         cell.className = columnIdentifier + &quot;-column&quot;;
</span><span class="cx">         cell.columnIdentifier = columnIdentifier;
</span><ins>+        if (column.aligned)
+            cell.classList.add(column.aligned);
</ins><span class="cx">         this._headerTableHeaders[columnIdentifier] = cell;
</span><span class="cx"> 
</span><span class="cx">         var div = document.createElement(&quot;div&quot;);
</span><span class="lines">@@ -1313,7 +1315,10 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.DataGridNode.prototype = {
</span><del>-    selectable: true,
</del><ins>+    get selectable()
+    {
+        return !this._element || !this._element.classList.contains(&quot;hidden&quot;);
+    },
</ins><span class="cx"> 
</span><span class="cx">     get element()
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDetailsSectioncss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx">     overflow: hidden;
</span><span class="cx">     text-overflow: ellipsis;
</span><span class="cx"> 
</span><ins>+    font-size: 11px;
</ins><span class="cx">     font-weight: bold;
</span><span class="cx"> 
</span><span class="cx">     padding: 4px 5px 4px 0;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -84,6 +84,7 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;TimelineSidebarPanel.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;TimelineContentView.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;OverviewTimelineView.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;NetworkTimelineView.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;TimelineIcons.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;TimelineRuler.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;TimelineDataGrid.css&quot;&gt;
</span><span class="lines">@@ -277,6 +278,7 @@
</span><span class="cx">     &lt;script src=&quot;TimelineContentView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;TimelineView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;OverviewTimelineView.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;NetworkTimelineView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;ApplicationCacheDetailsSidebarPanel.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;DOMTreeManager.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;DOMNode.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceNetworkTimelineViewcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.css (0 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.css                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.css        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.network &gt; .data-grid {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    border: none;
+}
+
+.sidebar &gt; .panel.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.network .item .subtitle {
+    display: none;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceNetworkTimelineViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.js (0 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.js                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/NetworkTimelineView.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -0,0 +1,200 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.NetworkTimelineView = function()
+{
+    WebInspector.TimelineView.call(this);
+
+    this.navigationSidebarTreeOutline.onselect = this._treeElementSelected.bind(this);
+    this.navigationSidebarTreeOutline.element.classList.add(WebInspector.NavigationSidebarPanel.HideDisclosureButtonsStyleClassName);
+    this.navigationSidebarTreeOutline.element.classList.add(WebInspector.NetworkTimelineView.TreeOutlineStyleClassName);
+
+    var columns = {domain: {}, type: {}, method: {}, scheme: {}, statusCode: {}, cached: {}, size: {}, transferSize: {}, requestSent: {}, latency: {}, duration: {}};
+
+    columns.domain.title = WebInspector.UIString(&quot;Domain&quot;);
+    columns.domain.width = &quot;10%&quot;;
+
+    columns.type.title = WebInspector.UIString(&quot;Type&quot;);
+    columns.type.width = &quot;8%&quot;;
+    columns.type.scopeBar = WebInspector.TimelineDataGrid.createColumnScopeBar(&quot;network&quot;, WebInspector.Resource.Type);
+
+    columns.method.title = WebInspector.UIString(&quot;Method&quot;);
+    columns.method.width = &quot;6%&quot;;
+
+    columns.scheme.title = WebInspector.UIString(&quot;Scheme&quot;);
+    columns.scheme.width = &quot;6%&quot;;
+
+    columns.statusCode.title = WebInspector.UIString(&quot;Status&quot;);
+    columns.statusCode.width = &quot;6%&quot;;
+
+    columns.cached.title = WebInspector.UIString(&quot;Cached&quot;);
+    columns.cached.width = &quot;6%&quot;;
+
+    columns.size.title = WebInspector.UIString(&quot;Size&quot;);
+    columns.size.width = &quot;8%&quot;;
+    columns.size.aligned = &quot;right&quot;;
+
+    columns.transferSize.title = WebInspector.UIString(&quot;Transfered&quot;);
+    columns.transferSize.width = &quot;8%&quot;;
+    columns.transferSize.aligned = &quot;right&quot;;
+
+    columns.requestSent.title = WebInspector.UIString(&quot;Start Time&quot;);
+    columns.requestSent.width = &quot;9%&quot;;
+    columns.requestSent.aligned = &quot;right&quot;;
+    columns.requestSent.sort = &quot;ascending&quot;;
+
+    columns.latency.title = WebInspector.UIString(&quot;Latency&quot;);
+    columns.latency.width = &quot;9%&quot;;
+    columns.latency.aligned = &quot;right&quot;;
+
+    columns.duration.title = WebInspector.UIString(&quot;Duration&quot;);
+    columns.duration.width = &quot;9%&quot;;
+    columns.duration.aligned = &quot;right&quot;;
+
+    for (var column in columns)
+        columns[column].sortable = true;
+
+    this._dataGrid = new WebInspector.TimelineDataGrid(this.navigationSidebarTreeOutline, columns);
+    this._dataGrid.addEventListener(WebInspector.TimelineDataGrid.Event.FiltersDidChange, this._dataGridFiltersDidChange, this);
+
+    this.element.classList.add(WebInspector.NetworkTimelineView.StyleClassName);
+    this.element.appendChild(this._dataGrid.element);
+
+    this._pendingRecords = [];
+};
+
+WebInspector.NetworkTimelineView.StyleClassName = &quot;network&quot;;
+WebInspector.NetworkTimelineView.TreeOutlineStyleClassName = &quot;network&quot;;
+
+WebInspector.NetworkTimelineView.prototype = {
+    constructor: WebInspector.NetworkTimelineView,
+    __proto__: WebInspector.TimelineView.prototype,
+
+    // Public
+
+    get navigationSidebarTreeOutlineLabel()
+    {
+        return WebInspector.UIString(&quot;Resources&quot;);
+    },
+
+    shown: function()
+    {
+        WebInspector.TimelineView.prototype.shown.call(this);
+
+        this._dataGrid.shown();
+    },
+
+    hidden: function()
+    {
+        this._dataGrid.hidden();
+
+        WebInspector.TimelineView.prototype.hidden.call(this);
+    },
+
+    updateLayout: function()
+    {
+        WebInspector.TimelineView.prototype.updateLayout.call(this);
+
+        this._dataGrid.updateLayout();
+
+        this._processPendingRecords();
+    },
+
+    matchTreeElementAgainstCustomFilters: function(treeElement)
+    {
+        return this._dataGrid.treeElementMatchesActiveScopeFilters(treeElement);
+    },
+
+    reset: function()
+    {
+        WebInspector.TimelineView.prototype.reset.call(this);
+
+        this._dataGrid.reset();
+
+        if (this._networkTimeline)
+            this._networkTimeline.removeEventListener(null, null, this);
+
+        this._networkTimeline = WebInspector.timelineManager.recording.timelines.get(WebInspector.TimelineRecord.Type.Network);
+        console.assert(this._networkTimeline);
+
+        this._networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
+    },
+
+    // Private
+
+    _processPendingRecords: function()
+    {
+        if (!this._pendingRecords.length)
+            return;
+
+        for (var resourceTimelineRecord of this._pendingRecords) {
+            // Skip the record if it already exists in the tree.
+            var treeElement = this.navigationSidebarTreeOutline.findTreeElement(resourceTimelineRecord.resource);
+            if (treeElement)
+                continue;
+
+            treeElement = new WebInspector.ResourceTreeElement(resourceTimelineRecord.resource);
+            var dataGridNode = new WebInspector.ResourceTimelineDataGridNode(resourceTimelineRecord, false, this);
+
+            this._dataGrid.addRowInSortOrder(treeElement, dataGridNode);
+        }
+
+        this._pendingRecords = [];
+    },
+
+    _networkTimelineRecordAdded: function(event)
+    {
+        var resourceTimelineRecord = event.data.record;
+        console.assert(resourceTimelineRecord instanceof WebInspector.ResourceTimelineRecord);
+
+        this._pendingRecords.push(resourceTimelineRecord);
+
+        this.needsLayout();
+    },
+
+    _dataGridFiltersDidChange: function(event)
+    {
+        WebInspector.timelineSidebarPanel.updateFilter();
+    },
+
+    _treeElementSelected: function(treeElement, selectedByUser)
+    {
+        if (this._dataGrid.shouldIgnoreSelectionEvent())
+            return;
+
+        if (!WebInspector.timelineSidebarPanel.canShowDifferentContentView())
+            return;
+
+        if (treeElement instanceof WebInspector.FolderTreeElement)
+            return;
+
+        if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
+            WebInspector.resourceSidebarPanel.showSourceCode(treeElement.representedObject);
+            return;
+        }
+
+        console.error(&quot;Unknown tree element selected.&quot;);
+    }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceResourceTimelineDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/ResourceTimelineDataGridNode.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/ResourceTimelineDataGridNode.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/ResourceTimelineDataGridNode.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -168,6 +168,11 @@
</span><span class="cx"> 
</span><span class="cx">     _needsRefresh: function()
</span><span class="cx">     {
</span><ins>+        if (this.dataGrid instanceof WebInspector.TimelineDataGrid) {
+            this.dataGrid.dataGridNodeNeedsRefresh(this);
+            return;
+        }
+
</ins><span class="cx">         if (this._scheduledRefreshIdentifier)
</span><span class="cx">             return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTimelineContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TimelineContentView.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TimelineContentView.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TimelineContentView.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx">     this._overviewTimelineView = new WebInspector.OverviewTimelineView;
</span><span class="cx">     this._discreteTimelineViewMap = {
</span><del>-        [WebInspector.TimelineRecord.Type.Network]: new WebInspector.TimelineView,
</del><ins>+        [WebInspector.TimelineRecord.Type.Network]: new WebInspector.NetworkTimelineView,
</ins><span class="cx">         [WebInspector.TimelineRecord.Type.Layout]: new WebInspector.TimelineView,
</span><span class="cx">         [WebInspector.TimelineRecord.Type.Script]: new WebInspector.TimelineView
</span><span class="cx">     };
</span><span class="lines">@@ -151,6 +151,9 @@
</span><span class="cx"> 
</span><span class="cx">     matchTreeElementAgainstCustomFilters: function(treeElement)
</span><span class="cx">     {
</span><ins>+        if (this._currentTimelineView &amp;&amp; !this._currentTimelineView.matchTreeElementAgainstCustomFilters(treeElement))
+            return false;
+
</ins><span class="cx">         var startTime = this._timelineOverview.selectionStartTime;
</span><span class="cx">         var endTime = this._timelineOverview.selectionStartTime + this._timelineOverview.selectionDuration;
</span><span class="cx">         var currentTime = this._currentTimeMarker.time || WebInspector.timelineManager.recording.startTime;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTimelineDataGridcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.css (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.css        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.css        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -23,6 +23,118 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+.data-grid.timeline {
+    border: none;
+}
+
+.data-grid.timeline table {
+    font-size: 11px;
+}
+
+.data-grid.timeline th {
+    height: 22px;
+
+    font-size: 11px;
+    font-family: &quot;Lucida Grande&quot;, sans-serif;
+
+    background-image: none;
+    background-color: white;
+
+    border-top: 1px solid rgb(179, 179, 179) !important;
+    border-bottom: 1px solid rgb(179, 179, 179) !important;
+}
+
+.data-grid.timeline th:not(:last-child) {
+    border-right: 1px solid rgb(179, 179, 179);
+}
+
+.data-grid.timeline th.sortable:active {
+    background-image: none !important;
+    background-color: rgb(210, 210, 210);
+}
+
+.data-grid.timeline th.sort-ascending,
+.data-grid.timeline th.sort-descending {
+    background-image: none !important;
+    background-color: rgb(230, 230, 230);
+}
+
+.data-grid.timeline .data-container {
+    top: 23px;
+}
+
+.data-grid.timeline th,
+.data-grid.timeline td {
+    padding-left: 6px;
+    padding-right: 6px;
+}
+
+.data-grid.timeline td:last-child {
+    padding-right: 12px;
+}
+
+.data-grid.timeline td {
+    padding-top: 2px;
+    padding-bottom: 2px;
+    line-height: 17px;
+}
+
+.data-grid.timeline td:not(:last-child) {
+    border-right: 1px solid rgb(179, 179, 179);
+}
+
+.data-grid.timeline:focus tr.selected td:not(:last-child) {
+    border-right-color: rgb(53, 109, 189);
+}
+
+.data-grid.timeline th.sort-ascending &gt; div:first-child,
+.data-grid.timeline th.sort-descending &gt; div:first-child {
+    padding-right: 13px;
+}
+
+.data-grid.timeline th.sort-ascending &gt; div:first-child::after,
+.data-grid.timeline th.sort-descending &gt; div:first-child::after {
+    top: 1px;
+}
+
+.data-grid.timeline td.error {
+    color: rgb(224, 16, 16);
+}
+
+.data-grid.timeline tr.selected td.error {
+    color: inherit;
+}
+
+.data-grid.timeline &gt; .navigation-bar-container {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    height: 32px;
+
+    pointer-events: none;
+    visibility: hidden;
+}
+
+.data-grid.timeline:hover &gt; .navigation-bar-container {
+    pointer-events: all;
+    visibility: visible;
+}
+
+.data-grid.timeline &gt; .navigation-bar-container &gt; .navigation-bar {
+    position: absolute;
+    top: 10px;
+    left: 0;
+    right: 0;
+    height: 22px;
+
+    border-bottom: none;
+    border-top: 1px solid rgb(200, 200, 200);
+    box-shadow: none;
+
+    background-color: white;
+}
+
</ins><span class="cx"> .timeline-data-grid-tree-outline {
</span><span class="cx">     position: relative;
</span><span class="cx">     padding: 0;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTimelineDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TimelineDataGrid.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -23,37 +23,46 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.TimelineDataGrid = function(columns, editCallback, deleteCallback)
</del><ins>+WebInspector.TimelineDataGrid = function(treeOutline, columns, editCallback, deleteCallback)
</ins><span class="cx"> {
</span><span class="cx">     WebInspector.DataGrid.call(this, columns, editCallback, deleteCallback);
</span><span class="cx"> 
</span><del>-    this.filterableColumns = [];
</del><ins>+    this._treeOutlineDataGridSynchronizer = new WebInspector.TreeOutlineDataGridSynchronizer(treeOutline, this);
</ins><span class="cx"> 
</span><ins>+    this.element.classList.add(WebInspector.TimelineDataGrid.StyleClassName);
+
+    this._filterableColumns = [];
+
</ins><span class="cx">     // Check if any of the cells can be filtered.
</span><span class="cx">     for (var identifier in columns) {
</span><span class="cx">         var scopeBar = columns[identifier].scopeBar;
</span><span class="cx">         if (!scopeBar)
</span><span class="cx">             continue;
</span><del>-        this.filterableColumns.push(identifier);
</del><ins>+        this._filterableColumns.push(identifier);
</ins><span class="cx">         scopeBar.columnIdenfifier = identifier;
</span><span class="cx">         scopeBar.addEventListener(WebInspector.ScopeBar.Event.SelectionChanged, this._scopeBarSelectedItemsDidChange, this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (this.filterableColumns.length &gt; 1) {
</del><ins>+    if (this._filterableColumns.length &gt; 1) {
</ins><span class="cx">         console.error(&quot;Creating a TimelineDataGrid with more than one filterable column is not yet supported.&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    var items = [new WebInspector.FlexibleSpaceNavigationItem, this.columns[this.filterableColumns[0]].scopeBar];
-    this._navigationBar = new WebInspector.NavigationBar(null, items);
-    var container = this.element.appendChild(document.createElement(&quot;div&quot;));
-    container.className = &quot;navigation-bar-container&quot;;
-    container.appendChild(this._navigationBar.element);
</del><ins>+    if (this._filterableColumns.length) {
+        var items = [new WebInspector.FlexibleSpaceNavigationItem, this.columns[this._filterableColumns[0]].scopeBar, new WebInspector.FlexibleSpaceNavigationItem];
+        this._navigationBar = new WebInspector.NavigationBar(null, items);
+        var container = this.element.appendChild(document.createElement(&quot;div&quot;));
+        container.className = &quot;navigation-bar-container&quot;;
+        container.appendChild(this._navigationBar.element);
+    }
</ins><span class="cx"> 
</span><span class="cx">     this.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridSelectedNodeChanged, this);
</span><ins>+    this.addEventListener(WebInspector.DataGrid.Event.SortChanged, this._sort, this);
+
</ins><span class="cx">     window.addEventListener(&quot;resize&quot;, this._windowResized.bind(this));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebInspector.TimelineDataGrid.StyleClassName = &quot;timeline&quot;;
</ins><span class="cx"> WebInspector.TimelineDataGrid.DelayedPopoverShowTimeout = 250;
</span><span class="cx"> WebInspector.TimelineDataGrid.DelayedPopoverHideContentClearTimeout = 500;
</span><span class="cx"> 
</span><span class="lines">@@ -61,76 +70,249 @@
</span><span class="cx">     FiltersDidChange: &quot;timelinedatagrid-filters-did-change&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.TimelineDataGrid.createColumnScopeBar = function(prefix, dictionary)
+{
+    prefix = prefix + &quot;-timeline-data-grid-&quot;;
+
+    var keys = Object.keys(dictionary).filter(function(key) {
+        return typeof dictionary[key] === &quot;string&quot; || dictionary[key] instanceof String;
+    });
+
+    var scopeBarItems = keys.map(function(key) {
+        var value = dictionary[key];
+        var id = prefix + value;
+        var label = dictionary.displayName(value, true);
+        var item = new WebInspector.ScopeBarItem(id, label);
+        item.value = value;
+        return item;
+    });
+
+    scopeBarItems.unshift(new WebInspector.ScopeBarItem(prefix + &quot;type-all&quot;, WebInspector.UIString(&quot;All&quot;), true));
+
+    return new WebInspector.ScopeBar(prefix + &quot;scope-bar&quot;, scopeBarItems, scopeBarItems[0]);
+};
+
</ins><span class="cx"> WebInspector.TimelineDataGrid.prototype = {
</span><span class="cx">     constructor: WebInspector.TimelineDataGrid,
</span><ins>+    __proto__: WebInspector.DataGrid.prototype,
</ins><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><del>-    get currentCalculator()
</del><ins>+    reset: function()
</ins><span class="cx">     {
</span><del>-        // Implemented by subclasses if they have a graph.
-        return null;
-    },
</del><ins>+        // May be overridden by subclasses. If so, they should call the superclass.
</ins><span class="cx"> 
</span><del>-    updateCalculatorBoundariesWithRecord: function(record)
-    {
-        // Implemented by subclasses if they have a graph.
</del><ins>+        this._hidePopover();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    updateCalculatorBoundariesWithDataGridNode: function(node)
</del><ins>+    shown: function()
</ins><span class="cx">     {
</span><del>-        // Implemented by subclasses if they have a graph.
-    },
</del><ins>+        // May be overridden by subclasses. If so, they should call the superclass.
</ins><span class="cx"> 
</span><del>-    updateCalculatorBoundariesWithEventMarker: function(eventMarker)
-    {
-        // Implemented by subclasses if they have a graph.
</del><ins>+        this._treeOutlineDataGridSynchronizer.synchronize();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    reset: function()
</del><ins>+    hidden: function()
</ins><span class="cx">     {
</span><span class="cx">         // May be overridden by subclasses. If so, they should call the superclass.
</span><span class="cx"> 
</span><span class="cx">         this._hidePopover();
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    shown: function()
</del><ins>+    callFramePopoverAnchorElement: function()
</ins><span class="cx">     {
</span><span class="cx">         // Implemented by subclasses.
</span><ins>+        return null;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    hidden: function()
</del><ins>+    updateLayout: function()
</ins><span class="cx">     {
</span><del>-        // May be overridden by subclasses. If so, they should call the superclass.
</del><ins>+        WebInspector.DataGrid.prototype.updateLayout.call(this);
</ins><span class="cx"> 
</span><del>-        this._hidePopover();
</del><ins>+        if (this._navigationBar)
+            this._navigationBar.updateLayout();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    update: function()
</del><ins>+    treeElementMatchesActiveScopeFilters: function(treeElement)
</ins><span class="cx">     {
</span><del>-        // Implemented by subclasses.
</del><ins>+        var dataGridNode = this._treeOutlineDataGridSynchronizer.dataGridNodeForTreeElement(treeElement);
+        console.assert(dataGridNode);
+
+        for (var identifier of this._filterableColumns) {
+            var scopeBar = this.columns[identifier].scopeBar;
+            if (!scopeBar || scopeBar.defaultItem.selected)
+                continue;
+
+            var value = dataGridNode.data[identifier];
+            var matchesFilter = scopeBar.selectedItems.some(function(scopeBarItem) {
+                return scopeBarItem.value === value;
+            });
+
+            if (!matchesFilter)
+                return false;
+        }
+
+        return true;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    addTimelineEventMarker: function(eventMarker)
</del><ins>+    addRowInSortOrder: function(treeElement, dataGridNode)
</ins><span class="cx">     {
</span><del>-        // Implemented by subclasses.
</del><ins>+        this._treeOutlineDataGridSynchronizer.associate(treeElement, dataGridNode);
+
+        var treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline;
+
+        if (this.sortColumnIdentifier) {
+            var insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, this.children, this._sortComparator.bind(this));
+
+            // Insert into the tree outline, which will cause the synchronizer to insert into the data grid.
+            treeOutline.insertChild(treeElement, insertionIndex);
+        } else {
+            // Append to the tree outline, which will cause the synchronizer to append to the data grid.
+            treeOutline.appendChild(treeElement);
+        }
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    callFramePopoverAnchorElement: function()
</del><ins>+    shouldIgnoreSelectionEvent: function()
</ins><span class="cx">     {
</span><del>-        // Implemented by subclasses.
-        return null;
</del><ins>+        return this._ignoreSelectionEvent || false;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    updateLayout: function()
</del><ins>+    // Protected
+
+    dataGridNodeNeedsRefresh: function(dataGridNode)
</ins><span class="cx">     {
</span><del>-        WebInspector.DataGrid.prototype.updateLayout.call(this);
</del><ins>+        if (!this._dirtyDataGridNodes)
+            this._dirtyDataGridNodes = new Set;
+        this._dirtyDataGridNodes.add(dataGridNode);
</ins><span class="cx"> 
</span><del>-        this._navigationBar.updateLayout();
</del><ins>+        if (this._scheduledDataGridNodeRefreshIdentifier)
+            return;
+
+        this._scheduledDataGridNodeRefreshIdentifier = requestAnimationFrame(this._refreshDirtyDataGridNodes.bind(this));
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="cx"> 
</span><ins>+    _refreshDirtyDataGridNodes: function()
+    {
+        if (this._scheduledDataGridNodeRefreshIdentifier) {
+            cancelAnimationFrame(this._scheduledDataGridNodeRefreshIdentifier);
+            delete this._scheduledDataGridNodeRefreshIdentifier;
+        }
+
+        if (!this._dirtyDataGridNodes)
+            return;
+
+        var selectedNode = this.selectedNode;
+        var sortComparator = this._sortComparator.bind(this);
+        var treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline;
+
+        this._treeOutlineDataGridSynchronizer.enabled = false;
+
+        for (var dataGridNode of this._dirtyDataGridNodes) {
+            dataGridNode.refresh();
+
+            if (!this.sortColumnIdentifier)
+                continue;
+
+            if (dataGridNode === selectedNode)
+                this._ignoreSelectionEvent = true;
+
+            var treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode);
+            console.assert(treeElement);
+
+            treeOutline.removeChild(treeElement);
+            this.removeChild(dataGridNode);
+
+            var insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, this.children, sortComparator);
+            treeOutline.insertChild(treeElement, insertionIndex);
+            this.insertChild(dataGridNode, insertionIndex);
+
+            if (dataGridNode === selectedNode) {
+                selectedNode.revealAndSelect();
+                delete this._ignoreSelectionEvent;
+            }
+        }
+
+        this._treeOutlineDataGridSynchronizer.enabled = true;
+
+        delete this._dirtyDataGridNodes;
+    },
+
+    _sort: function()
+    {
+        var sortColumnIdentifier = this.sortColumnIdentifier;
+        if (!sortColumnIdentifier)
+            return;
+
+        var selectedNode = this.selectedNode;
+        this._ignoreSelectionEvent = true;
+
+        var dataGridNodes = this.children.slice();
+        dataGridNodes.sort(this._sortComparator.bind(this));
+
+        this._treeOutlineDataGridSynchronizer.enabled = false;
+
+        var treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline;
+
+        this.removeChildren();
+        treeOutline.removeChildren();
+
+        for (var dataGridNode of dataGridNodes) {
+            var treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode);
+            console.assert(treeElement);
+
+            treeOutline.appendChild(treeElement);
+            this.appendChild(dataGridNode);
+        }
+
+        this._treeOutlineDataGridSynchronizer.enabled = true;
+
+        if (selectedNode)
+            selectedNode.revealAndSelect();
+
+        delete this._ignoreSelectionEvent;
+    },
+
+    _sortComparator: function(node1, node2)
+    {
+        var sortColumnIdentifier = this.sortColumnIdentifier;
+        if (!sortColumnIdentifier)
+            return 0;
+
+        var sortDirection = this.sortOrder === &quot;ascending&quot; ? 1 : -1;
+
+        var value1 = node1.data[sortColumnIdentifier];
+        var value2 = node2.data[sortColumnIdentifier];
+
+        if (typeof value1 === &quot;number&quot; &amp;&amp; typeof value2 === &quot;number&quot;) {
+            if (isNaN(value1) &amp;&amp; isNaN(value2))
+                return 0;
+            if (isNaN(value1))
+                return -sortDirection;
+            if (isNaN(value2))
+                return sortDirection;
+            return (value1 - value2) * sortDirection;
+        }
+
+        if (typeof value1 === &quot;string&quot; &amp;&amp; typeof value2 === &quot;string&quot;)
+            return value1.localeCompare(value2) * sortDirection;
+
+        if (value1 instanceof WebInspector.CallFrame || value2 instanceof WebInspector.CallFrame) {
+            // Sort by function name if available, then fall back to the source code object.
+            value1 = value1 &amp;&amp; value1.functionName ? value1.functionName : (value1 &amp;&amp; value1.sourceCodeLocation ? value1.sourceCodeLocation.sourceCode : &quot;&quot;);
+            value2 = value2 &amp;&amp; value2.functionName ? value2.functionName : (value2 &amp;&amp; value2.sourceCodeLocation ? value2.sourceCodeLocation.sourceCode : &quot;&quot;);
+        }
+
+        if (value1 instanceof WebInspector.SourceCode || value2 instanceof WebInspector.SourceCode) {
+            value1 = value1 ? value1.displayName || &quot;&quot; : &quot;&quot;;
+            value2 = value2 ? value2.displayName || &quot;&quot; : &quot;&quot;;
+        }
+
+        // For everything else (mostly booleans).
+        return (value1 &lt; value2 ? -1 : (value1 &gt; value2 ? 1 : 0)) * sortDirection;
+    },
+
</ins><span class="cx">     _scopeBarSelectedItemsDidChange: function(event)
</span><span class="cx">     {
</span><span class="cx">         var columnIdentifier = event.target.columnIdenfifier;
</span><span class="lines">@@ -256,6 +438,4 @@
</span><span class="cx"> 
</span><span class="cx">         WebInspector.resourceSidebarPanel.showSourceCodeLocation(callFrame.sourceCodeLocation);
</span><span class="cx">     }
</span><del>-}
-
-WebInspector.TimelineDataGrid.prototype.__proto__ = WebInspector.DataGrid.prototype;
</del><ins>+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTimelineSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TimelineSidebarPanel.css (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TimelineSidebarPanel.css        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TimelineSidebarPanel.css        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     overflow: hidden;
</span><span class="cx">     text-overflow: ellipsis;
</span><span class="cx"> 
</span><del>-    font-size: 10px;
</del><ins>+    font-size: 11px;
</ins><span class="cx">     font-family: &quot;Lucida Grande&quot;, sans-serif;
</span><span class="cx">     font-weight: bold;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TimelineView.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TimelineView.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TimelineView.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -151,6 +151,12 @@
</span><span class="cx">         this._visible = false;
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    matchTreeElementAgainstCustomFilters: function(treeElement)
+    {
+        // Implemented by sub-classes if needed.
+        return true;
+    },
+
</ins><span class="cx">     updateLayout: function()
</span><span class="cx">     {
</span><span class="cx">         if (this._scheduledLayoutUpdateIdentifier) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceTreeOutlineDataGridSynchronizerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/TreeOutlineDataGridSynchronizer.js (162414 => 162415)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/TreeOutlineDataGridSynchronizer.js        2014-01-21 02:55:44 UTC (rev 162414)
+++ trunk/Source/WebInspectorUI/UserInterface/TreeOutlineDataGridSynchronizer.js        2014-01-21 02:55:52 UTC (rev 162415)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx">     this._treeOutline = treeOutline;
</span><span class="cx">     this._dataGrid = dataGrid;
</span><ins>+    this._enabled = true;
</ins><span class="cx"> 
</span><span class="cx">     this._treeOutline.element.parentNode.addEventListener(&quot;scroll&quot;, this._treeOutlineScrolled.bind(this));
</span><span class="cx">     this._dataGrid.scrollContainer.addEventListener(&quot;scroll&quot;, this._dataGridScrolled.bind(this));
</span><span class="lines">@@ -90,6 +91,26 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get treeOutline()
+    {
+        return this._treeOutline;
+    },
+
+    get dataGrid()
+    {
+        return this._dataGrid;
+    },
+
+    get enabled()
+    {
+        return this._enabled;
+    },
+
+    set enabled(x)
+    {
+        this._enabled = x || false;
+    },
+
</ins><span class="cx">     associate: function(treeElement, dataGridNode)
</span><span class="cx">     {
</span><span class="cx">         console.assert(treeElement);
</span><span class="lines">@@ -108,10 +129,23 @@
</span><span class="cx">             this._dataGrid.selectedNode.deselect(true);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    treeElementForDataGridNode: function(dataGridNode)
+    {
+        return dataGridNode.__treeElement || null;
+    },
+
+    dataGridNodeForTreeElement: function(treeElement)
+    {
+        return treeElement.__dataGridNode || null;
+    },
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _treeOutlineScrolled: function(event)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         if (this._ignoreNextTreeOutlineScrollEvent) {
</span><span class="cx">             delete this._ignoreNextTreeOutlineScrollEvent;
</span><span class="cx">             return;
</span><span class="lines">@@ -123,6 +157,9 @@
</span><span class="cx"> 
</span><span class="cx">     _dataGridScrolled: function(event)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         if (this._ignoreNextDataGridScrollEvent) {
</span><span class="cx">             delete this._ignoreNextDataGridScrollEvent;
</span><span class="cx">             return;
</span><span class="lines">@@ -134,6 +171,9 @@
</span><span class="cx"> 
</span><span class="cx">     _dataGridNodeSelected: function(event)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = this._dataGrid.selectedNode;
</span><span class="cx">         if (dataGridNode)
</span><span class="cx">             dataGridNode.__treeElement.select(true, true, true, true);
</span><span class="lines">@@ -141,6 +181,9 @@
</span><span class="cx"> 
</span><span class="cx">     _dataGridNodeExpanded: function(event)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = event.data.dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -150,6 +193,9 @@
</span><span class="cx"> 
</span><span class="cx">     _dataGridNodeCollapsed: function(event)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = event.data.dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -159,6 +205,9 @@
</span><span class="cx"> 
</span><span class="cx">     _treeElementSelected: function(treeElement, selectedByUser)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -167,6 +216,9 @@
</span><span class="cx"> 
</span><span class="cx">     _treeElementAdded: function(treeElement)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -181,14 +233,21 @@
</span><span class="cx"> 
</span><span class="cx">     _treeElementRemoved: function(treeElement)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><del>-        dataGridNode.parent.removeChild(dataGridNode);
</del><ins>+        if (dataGridNode.parent)
+            dataGridNode.parent.removeChild(dataGridNode);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _treeElementExpanded: function(treeElement)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -198,6 +257,9 @@
</span><span class="cx"> 
</span><span class="cx">     _treeElementCollapsed: function(treeElement)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><span class="lines">@@ -207,13 +269,13 @@
</span><span class="cx"> 
</span><span class="cx">     _treeElementHiddenChanged: function(treeElement, hidden)
</span><span class="cx">     {
</span><ins>+        if (!this._enabled)
+            return;
+
</ins><span class="cx">         var dataGridNode = treeElement.__dataGridNode;
</span><span class="cx">         console.assert(dataGridNode);
</span><span class="cx"> 
</span><del>-        if (hidden)
-            dataGridNode.element.classList.add(&quot;hidden&quot;);
-        else
-            dataGridNode.element.classList.remove(&quot;hidden&quot;);
</del><ins>+        dataGridNode.element.classList.toggle(&quot;hidden&quot;, hidden);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>