<!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>[187468] 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/187468">187468</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2015-07-27 17:13:47 -0700 (Mon, 27 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Clicking a frame in the Rendering Frames timeline should select the corresponding grid row
https://bugs.webkit.org/show_bug.cgi?id=147013

Reviewed by Timothy Hatcher.

Added ability to select (or highlight) a particular frame by clicking in the overview graph. A tick mark
appears above the selected frame inside the ruler, and the frame element's background color changes to a light
blue vertical highlight. Frame selection is synced across the timeline view's data grid, overview graph, and
navigation bar path components.

A few behaviors:
   - Clicking a frame outside the current ruler selection selects the frame.
   - Clicking the selected frame will deselect it.
   - Resizing the ruler selection to exclude the selected frame will deselect it.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.select):
No need to generate two SelectedNodeChanged events when selecting a node causes
the currently selected node to be deselected.

* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph): Set TimelineOverview during construction.
Set TimelineOverview during construction.

* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame &gt; .frame-marker):
(body.window-inactive .timeline-overview-graph.rendering-frame &gt; .frame-marker):
Added styles for selected frame marker.

* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph):
Set TimelineOverview during construction.
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
Added frame marker element and frame selection via mouse click.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.treeElementDeselected):
Deselect grid node when frame is deselected from the overview graph.
(WebInspector.RenderingFrameTimelineView.prototype.filterDidChange): Deleted.
Removed unnecessary override.

* UserInterface/Views/TimelineOverview.js:
Added selectRecord method and RecordSelected event.
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._timelineRulerMouseDown):
(WebInspector.TimelineOverview.prototype._timelineRulerMouseClicked):
Since timeline ruler specifies pointer-events: all, click events must be forwarded to the
underlying overview graph. Click events following changes to the ruler's selection are ignored.

(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineOverview.prototype._recordSelected):
Forward RecordSelected events from child graphs to clients of the overview.

* UserInterface/Views/TimelineOverviewGraph.js:
Added RecordSelected event.
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.get visible):
(WebInspector.TimelineOverviewGraph.prototype.get selectedRecord):
(WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
Added property for selecting a record in the graph. Derived graph types can implement record selection
and choose how to style the selected record.
(WebInspector.TimelineOverviewGraph.prototype.updateLayout):
(WebInspector.TimelineOverviewGraph.prototype.needsLayout):
Update frame marker during an animation frame.
(WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent):
Dispatch wrapper to simplify things.
(WebInspector.TimelineOverviewGraph.prototype.updateSelectedRecord):
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout.update):
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
Inform derived overview graph to optionally style the selected record.
(WebInspector.TimelineOverviewGraph.prototype.set timelineOverview): Deleted.
No longer needed. TimelineOverview set during construction.

* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame):
(.timeline-record-frame.tall):
Limit the &quot;fade out&quot; effect to frames that are &gt;= 95% of the graph height, otherwise the
gradient mask is noticeable when selecting a shorter frame.
(.timeline-record-frame.selected):
(body.window-inactive .timeline-record-frame.selected):
(.timeline-record-frame.selected &gt; .frame):
Added highlight (and dimmed inactive highlight) for selected frame element.

* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.prototype.get selected):
(WebInspector.TimelineRecordFrame.prototype.set selected):
Added property for setting selected style.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
Select record in overview in response to changing navigation path.
(WebInspector.TimelineRecordingContentView.prototype._recordSelected.get console):
(WebInspector.TimelineRecordingContentView.prototype._recordSelected):
Update selected tree element in response to changing record selection in the overview graph.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs">trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineOverviewGraphcss">trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScriptTimelineOverviewGraphjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js</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="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordFramecss">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordFramejs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -1,3 +1,105 @@
</span><ins>+2015-07-27  Matt Baker  &lt;mattbaker@apple.com&gt;
+
+        Web Inspector: Clicking a frame in the Rendering Frames timeline should select the corresponding grid row
+        https://bugs.webkit.org/show_bug.cgi?id=147013
+
+        Reviewed by Timothy Hatcher.
+
+        Added ability to select (or highlight) a particular frame by clicking in the overview graph. A tick mark
+        appears above the selected frame inside the ruler, and the frame element's background color changes to a light
+        blue vertical highlight. Frame selection is synced across the timeline view's data grid, overview graph, and
+        navigation bar path components.
+
+        A few behaviors:
+           - Clicking a frame outside the current ruler selection selects the frame.
+           - Clicking the selected frame will deselect it.
+           - Resizing the ruler selection to exclude the selected frame will deselect it.
+
+        * UserInterface/Views/DataGrid.js:
+        (WebInspector.DataGridNode.prototype.select):
+        No need to generate two SelectedNodeChanged events when selecting a node causes
+        the currently selected node to be deselected.
+
+        * UserInterface/Views/LayoutTimelineOverviewGraph.js:
+        (WebInspector.LayoutTimelineOverviewGraph):
+        * UserInterface/Views/NetworkTimelineOverviewGraph.js:
+        (WebInspector.NetworkTimelineOverviewGraph):
+        * UserInterface/Views/ScriptTimelineOverviewGraph.js:
+        (WebInspector.ScriptTimelineOverviewGraph): Set TimelineOverview during construction.
+        Set TimelineOverview during construction.
+
+        * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
+        (.timeline-overview-graph.rendering-frame &gt; .frame-marker):
+        (body.window-inactive .timeline-overview-graph.rendering-frame &gt; .frame-marker):
+        Added styles for selected frame marker.
+
+        * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
+        (WebInspector.RenderingFrameTimelineOverviewGraph):
+        Set TimelineOverview during construction.
+        (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
+        Added frame marker element and frame selection via mouse click.
+
+        * UserInterface/Views/RenderingFrameTimelineView.js:
+        (WebInspector.RenderingFrameTimelineView.prototype.treeElementDeselected):
+        Deselect grid node when frame is deselected from the overview graph.
+        (WebInspector.RenderingFrameTimelineView.prototype.filterDidChange): Deleted.
+        Removed unnecessary override.
+
+        * UserInterface/Views/TimelineOverview.js:
+        Added selectRecord method and RecordSelected event.
+        (WebInspector.TimelineOverview):
+        (WebInspector.TimelineOverview.prototype._timelineRulerMouseDown):
+        (WebInspector.TimelineOverview.prototype._timelineRulerMouseClicked):
+        Since timeline ruler specifies pointer-events: all, click events must be forwarded to the
+        underlying overview graph. Click events following changes to the ruler's selection are ignored.
+
+        (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
+        (WebInspector.TimelineOverview.prototype._recordSelected):
+        Forward RecordSelected events from child graphs to clients of the overview.
+
+        * UserInterface/Views/TimelineOverviewGraph.js:
+        Added RecordSelected event.
+        (WebInspector.TimelineOverviewGraph):
+        (WebInspector.TimelineOverviewGraph.prototype.get visible):
+        (WebInspector.TimelineOverviewGraph.prototype.get selectedRecord):
+        (WebInspector.TimelineOverviewGraph.prototype.set selectedRecord):
+        Added property for selecting a record in the graph. Derived graph types can implement record selection
+        and choose how to style the selected record.
+        (WebInspector.TimelineOverviewGraph.prototype.updateLayout):
+        (WebInspector.TimelineOverviewGraph.prototype.needsLayout):
+        Update frame marker during an animation frame.
+        (WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent):
+        Dispatch wrapper to simplify things.
+        (WebInspector.TimelineOverviewGraph.prototype.updateSelectedRecord):
+        (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout.update):
+        (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
+        Inform derived overview graph to optionally style the selected record.
+        (WebInspector.TimelineOverviewGraph.prototype.set timelineOverview): Deleted.
+        No longer needed. TimelineOverview set during construction.
+
+        * UserInterface/Views/TimelineRecordFrame.css:
+        (.timeline-record-frame):
+        (.timeline-record-frame.tall):
+        Limit the &quot;fade out&quot; effect to frames that are &gt;= 95% of the graph height, otherwise the
+        gradient mask is noticeable when selecting a shorter frame.
+        (.timeline-record-frame.selected):
+        (body.window-inactive .timeline-record-frame.selected):
+        (.timeline-record-frame.selected &gt; .frame):
+        Added highlight (and dimmed inactive highlight) for selected frame element.
+
+        * UserInterface/Views/TimelineRecordFrame.js:
+        (WebInspector.TimelineRecordFrame.prototype.get selected):
+        (WebInspector.TimelineRecordFrame.prototype.set selected):
+        Added property for setting selected style.
+
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView):
+        (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
+        Select record in overview in response to changing navigation path.
+        (WebInspector.TimelineRecordingContentView.prototype._recordSelected.get console):
+        (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
+        Update selected tree element in response to changing record selection in the overview graph.
+
</ins><span class="cx"> 2015-07-27  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Revert change to DOMTreeElement.prototype.remove
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -1725,7 +1725,7 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         if (this.dataGrid.selectedNode)
</span><del>-            this.dataGrid.selectedNode.deselect();
</del><ins>+            this.dataGrid.selectedNode.deselect(true);
</ins><span class="cx"> 
</span><span class="cx">         this._selected = true;
</span><span class="cx">         this.dataGrid.selectedNode = this;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineOverviewGraph.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -23,9 +23,9 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.LayoutTimelineOverviewGraph = function(timeline)
</del><ins>+WebInspector.LayoutTimelineOverviewGraph = function(timeline, timelineOverview)
</ins><span class="cx"> {
</span><del>-    WebInspector.TimelineOverviewGraph.call(this, timeline);
</del><ins>+    WebInspector.TimelineOverviewGraph.call(this, timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">     this.element.classList.add(&quot;layout&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -24,9 +24,9 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.NetworkTimelineOverviewGraph = function(timeline)
</del><ins>+WebInspector.NetworkTimelineOverviewGraph = function(timeline, timelineOverview)
</ins><span class="cx"> {
</span><del>-    WebInspector.TimelineOverviewGraph.call(this, timeline);
</del><ins>+    WebInspector.TimelineOverviewGraph.call(this, timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">     this.element.classList.add(&quot;network&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineOverviewGraphcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.css (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.css        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.css        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -46,3 +46,18 @@
</span><span class="cx"> 
</span><span class="cx">     color: hsl(0, 0%, 60%);
</span><span class="cx"> }
</span><ins>+
+.timeline-overview-graph.rendering-frame &gt; .frame-marker {
+    position: absolute;
+    display: block;
+    height: 3px;
+    top: -5px;
+
+    background: -webkit-linear-gradient(left, hsl(210, 100%, 49%), hsl(210, 100%, 49%)) no-repeat 1px 0;
+
+    pointer-events: none;
+}
+
+body.window-inactive .timeline-overview-graph.rendering-frame &gt; .frame-marker {
+    background-image: -webkit-linear-gradient(left, hsl(0, 0%, 60%), hsl(0, 0%, 60%));
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -23,16 +23,21 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.RenderingFrameTimelineOverviewGraph = function(timeline)
</del><ins>+WebInspector.RenderingFrameTimelineOverviewGraph = function(timeline, timelineOverview)
</ins><span class="cx"> {
</span><del>-    WebInspector.TimelineOverviewGraph.call(this, timeline);
</del><ins>+    WebInspector.TimelineOverviewGraph.call(this, timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">     this.element.classList.add(WebInspector.RenderingFrameTimelineOverviewGraph.StyleClassName);
</span><ins>+    this.element.addEventListener(&quot;click&quot;, this._mouseClicked.bind(this));
</ins><span class="cx"> 
</span><span class="cx">     this._renderingFrameTimeline = timeline;
</span><span class="cx">     this._renderingFrameTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._timelineRecordAdded, this);
</span><span class="cx"> 
</span><ins>+    this._selectedFrameMarker = document.createElement(&quot;div&quot;);
+    this._selectedFrameMarker.className = &quot;frame-marker&quot;;
+
</ins><span class="cx">     this._timelineRecordFrames = [];
</span><ins>+    this._selectedTimelineRecordFrame = null;
</ins><span class="cx">     this._graphHeightSeconds = NaN;
</span><span class="cx">     this._framesPerSecondDividerMap = new Map;
</span><span class="cx"> 
</span><span class="lines">@@ -70,6 +75,8 @@
</span><span class="cx"> 
</span><span class="cx">         this.element.removeChildren();
</span><span class="cx"> 
</span><ins>+        this.selectedRecord = null;
+
</ins><span class="cx">         this._framesPerSecondDividerMap.clear();
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -107,8 +114,36 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         this._updateDividers();
</span><ins>+        this._updateFrameMarker();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    // Protected
+
+    updateSelectedRecord()
+    {
+        if (!this.selectedRecord) {
+            this._updateFrameMarker();
+            return;
+        }
+
+        const visibleDuration = this.timelineOverview.visibleDuration;
+        const frameIndex = this.selectedRecord.frameIndex;
+
+        // Reveal a newly selected record if it's outside the visible range.
+        if (frameIndex &lt; Math.ceil(this.timelineOverview.scrollStartTime) || frameIndex &gt;= this.timelineOverview.scrollStartTime + visibleDuration) {
+            var scrollStartTime = frameIndex;
+            if (!this._selectedTimelineRecordFrame || Math.abs(this._selectedTimelineRecordFrame.record.frameIndex - this.selectedRecord.frameIndex) &gt; 1) {
+                scrollStartTime -= Math.floor(visibleDuration / 2);
+                scrollStartTime = Math.max(Math.min(scrollStartTime, this.timelineOverview.endTime), this.timelineOverview.startTime);
+            }
+
+            this.timelineOverview.scrollStartTime = scrollStartTime;
+            return;
+        }
+
+        this._updateFrameMarker();
+    },
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _timelineRecordAdded(event)
</span><span class="lines">@@ -154,13 +189,65 @@
</span><span class="cx">         createDividerAtPosition.call(this, 30);
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    _updateElementPosition(element, newPosition, property)
</del><ins>+    _updateFrameMarker()
</ins><span class="cx">     {
</span><del>-        newPosition *= 100;
-        newPosition = newPosition.toFixed(2);
</del><ins>+        if (this._selectedTimelineRecordFrame) {
+            this._selectedTimelineRecordFrame.selected = false;
+            this._selectedTimelineRecordFrame = null;
+        }
</ins><span class="cx"> 
</span><del>-        var currentPosition = parseFloat(element.style[property]).toFixed(2);
-        if (currentPosition !== newPosition)
-            element.style[property] = newPosition + &quot;%&quot;;
</del><ins>+        if (!this.selectedRecord) {
+            if (this._selectedFrameMarker.parentElement)
+                this.element.removeChild(this._selectedFrameMarker);
+
+            this.dispatchSelectedRecordChangedEvent();
+            return;
+        }
+
+        var frameWidth = (1 / this.timelineOverview.secondsPerPixel);
+        this._selectedFrameMarker.style.width = frameWidth + &quot;px&quot;;
+
+        var markerLeftPosition = this.selectedRecord.frameIndex - this.startTime;
+        this._selectedFrameMarker.style.left = ((markerLeftPosition / this.timelineOverview.visibleDuration) * 100).toFixed(2) + &quot;%&quot;;
+
+        if (!this._selectedFrameMarker.parentElement)
+            this.element.appendChild(this._selectedFrameMarker);
+
+        // Find and update the selected frame element.
+        var index = this._timelineRecordFrames.binaryIndexOf(this.selectedRecord, function(record, frame) {
+            return frame.record ? record.frameIndex - frame.record.frameIndex : -1;
+        });
+
+        console.assert(index &gt;= 0 &amp;&amp; index &lt; this._timelineRecordFrames.length, &quot;Selected record not within visible graph duration.&quot;, this.selectedRecord);
+        if (index &lt; 0 || index &gt;= this._timelineRecordFrames.length)
+            return;
+
+        this._selectedTimelineRecordFrame = this._timelineRecordFrames[index];
+        this._selectedTimelineRecordFrame.selected = true;
+
+        this.dispatchSelectedRecordChangedEvent();
+    },
+
+    _mouseClicked: function(event)
+    {
+        var position = event.pageX - this.element.getBoundingClientRect().left;
+        var frameIndex = Math.floor(position * this.timelineOverview.secondsPerPixel + this.startTime);
+        if (frameIndex &lt; 0 || frameIndex &gt;= this._renderingFrameTimeline.records.length)
+            return;
+
+        var newSelectedRecord = this._renderingFrameTimeline.records[frameIndex];
+        // Clicking the selected frame causes it to be deselected.
+        if (this.selectedRecord === newSelectedRecord)
+            newSelectedRecord = null;
+
+        if (frameIndex &gt;= this.timelineOverview.selectionStartTime &amp;&amp; frameIndex &lt; this.timelineOverview.selectionStartTime + this.timelineOverview.selectionDuration) {
+            this.selectedRecord = newSelectedRecord;
+            return;
+        }
+
+        // Clicking a frame outside the current ruler selection changes the selection to include the frame.
+        this.selectedRecord = newSelectedRecord;
+        this.timelineOverview.selectionStartTime = frameIndex;
+        this.timelineOverview.selectionDuration = 1;
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -143,11 +143,6 @@
</span><span class="cx">         return pathComponents;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    filterDidChange: function()
-    {
-        WebInspector.TimelineView.prototype.filterDidChange.call(this);
-    },
-
</del><span class="cx">     matchTreeElementAgainstCustomFilters: function(treeElement)
</span><span class="cx">     {
</span><span class="cx">         return this._dataGrid.treeElementMatchesActiveScopeFilters(treeElement);
</span><span class="lines">@@ -180,6 +175,15 @@
</span><span class="cx">         WebInspector.TimelineView.prototype.showContentViewForTreeElement.call(this, treeElement);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    treeElementDeselected: function(treeElement)
+    {
+        var dataGridNode = this._dataGrid.dataGridNodeForTreeElement(treeElement);
+        if (!dataGridNode)
+            return;
+
+        dataGridNode.deselect();
+    },
+
</ins><span class="cx">     treeElementSelected: function(treeElement, selectedByUser)
</span><span class="cx">     {
</span><span class="cx">         if (this._dataGrid.shouldIgnoreSelectionEvent())
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScriptTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineOverviewGraph.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -23,9 +23,9 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.ScriptTimelineOverviewGraph = function(timeline)
</del><ins>+WebInspector.ScriptTimelineOverviewGraph = function(timeline, timelineOverview)
</ins><span class="cx"> {
</span><del>-    WebInspector.TimelineOverviewGraph.call(this, timeline);
</del><ins>+    WebInspector.TimelineOverviewGraph.call(this, timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">     this.element.classList.add(&quot;script&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx">     this._timelineRuler = new WebInspector.TimelineRuler;
</span><span class="cx">     this._timelineRuler.allowsClippedLabels = true;
</span><span class="cx">     this._timelineRuler.allowsTimeRangeSelection = true;
</span><ins>+    this._timelineRuler.element.addEventListener(&quot;mousedown&quot;, this._timelineRulerMouseDown.bind(this));
+    this._timelineRuler.element.addEventListener(&quot;click&quot;, this._timelineRulerMouseClicked.bind(this));
</ins><span class="cx">     this._timelineRuler.addEventListener(WebInspector.TimelineRuler.Event.TimeRangeSelectionChanged, this._timeRangeSelectionChanged, this);
</span><span class="cx">     this._element.appendChild(this._timelineRuler.element);
</span><span class="cx"> 
</span><span class="lines">@@ -76,6 +78,7 @@
</span><span class="cx">     this._mouseWheelDelta = 0;
</span><span class="cx">     this._scrollStartTime = 0;
</span><span class="cx">     this._cachedScrollContainerWidth = NaN;
</span><ins>+    this._timelineRulerSelectionChanged = false;
</ins><span class="cx"> 
</span><span class="cx">     this.selectionStartTime = this._selectionStartValueSetting.value;
</span><span class="cx">     this.selectionDuration = this._selectionDurationSetting.value;
</span><span class="lines">@@ -90,6 +93,7 @@
</span><span class="cx"> WebInspector.TimelineOverview.ScrollDeltaDenominator = 500;
</span><span class="cx"> 
</span><span class="cx"> WebInspector.TimelineOverview.Event = {
</span><ins>+    RecordSelected: &quot;timeline-overview-record-selected&quot;,
</ins><span class="cx">     TimeRangeSelectionChanged: &quot;timeline-overview-time-range-selection-changed&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -285,6 +289,18 @@
</span><span class="cx">         this.scrollStartTime = marker.time - (this.visibleDuration / 2);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    selectRecord: function(timeline, record)
+    {
+        console.assert(this.canShowTimeline(timeline), timeline);
+
+        var overviewGraph = this._timelineOverviewGraphsMap.get(timeline);
+        console.assert(overviewGraph, &quot;Missing overview graph for timeline type &quot; + timeline.type);
+        if (!overviewGraph)
+            return;
+
+        overviewGraph.selectedRecord = record;
+    },
+
</ins><span class="cx">     updateLayoutForResize: function()
</span><span class="cx">     {
</span><span class="cx">         this._cachedScrollContainerWidth = NaN;
</span><span class="lines">@@ -456,8 +472,8 @@
</span><span class="cx">         if (!this.canShowTimeline(timeline))
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        var overviewGraph = new WebInspector.TimelineOverviewGraph(timeline);
-        overviewGraph.timelineOverview = this;
</del><ins>+        var overviewGraph = new WebInspector.TimelineOverviewGraph(timeline, this);
+        overviewGraph.addEventListener(WebInspector.TimelineOverviewGraph.Event.RecordSelected, this._recordSelected, this);
</ins><span class="cx">         this._timelineOverviewGraphsMap.set(timeline, overviewGraph);
</span><span class="cx">         this._graphsContainerElement.appendChild(overviewGraph.element);
</span><span class="cx">     },
</span><span class="lines">@@ -472,22 +488,56 @@
</span><span class="cx">         console.assert(this._timelineOverviewGraphsMap.has(timeline), timeline);
</span><span class="cx"> 
</span><span class="cx">         var overviewGraph = this._timelineOverviewGraphsMap.take(timeline);
</span><del>-        overviewGraph.timelineOverview = null;
</del><ins>+        overviewGraph.removeEventListener(WebInspector.TimelineOverviewGraph.Event.RecordSelected, this._recordSelected, this);
</ins><span class="cx">         this._graphsContainerElement.removeChild(overviewGraph.element);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    _timelineRulerMouseDown: function(event)
+    {
+        this._timelineRulerSelectionChanged = false;
+    },
+
+    _timelineRulerMouseClicked: function(event)
+    {
+        if (this._timelineRulerSelectionChanged)
+            return;
+
+        for (var overviewGraph of this._timelineOverviewGraphsMap.values()) {
+            var graphRect = overviewGraph.element.getBoundingClientRect();
+            if (!(event.pageX &gt;= graphRect.left &amp;&amp; event.pageX &lt;= graphRect.right &amp;&amp; event.pageY &gt;= graphRect.top &amp;&amp; event.pageY &lt;= graphRect.bottom))
+                continue;
+
+            // Clone the event to dispatch it on the overview graph element.
+            var newClickEvent = new event.constructor(event.type, event);
+            overviewGraph.element.dispatchEvent(newClickEvent);
+            return;
+        }
+    },
+
</ins><span class="cx">     _timeRangeSelectionChanged: function(event)
</span><span class="cx">     {
</span><ins>+        this._timelineRulerSelectionChanged = true;
</ins><span class="cx">         this._selectionStartValueSetting.value = this.selectionStartTime - this._startTime;
</span><span class="cx">         this._selectionDurationSetting.value = this.selectionDuration;
</span><span class="cx"> 
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.TimelineOverview.Event.TimeRangeSelectionChanged);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    _recordSelected: function(event)
+    {
+        for ([timeline, overviewGraph] of this._timelineOverviewGraphsMap) {
+            if (overviewGraph !== event.target)
+                continue;
+
+            this.dispatchEventToListeners(WebInspector.TimelineOverview.Event.RecordSelected, {timeline, record: event.data.record});
+            return;
+        }
+    },
+
</ins><span class="cx">     _resetSelection: function()
</span><span class="cx">     {
</span><span class="cx">         this.secondsPerPixel = this._defaultSettingsValues.durationPerPixel;
</span><span class="cx">         this.selectionStartTime = this._defaultSettingsValues.selectionStartValue;
</span><span class="cx">         this.selectionDuration = this._defaultSettingsValues.selectionDuration;
</span><del>-    },
</del><ins>+    }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineOverviewGraphjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.TimelineOverviewGraph = function(timeline)
</del><ins>+WebInspector.TimelineOverviewGraph = function(timeline, timelineOverview)
</ins><span class="cx"> {
</span><span class="cx">     if (this.constructor === WebInspector.TimelineOverviewGraph) {
</span><span class="cx">         // When instantiated directly return an instance of a type-based concrete subclass.
</span><span class="lines">@@ -32,16 +32,16 @@
</span><span class="cx"> 
</span><span class="cx">         var timelineType = timeline.type;
</span><span class="cx">         if (timelineType === WebInspector.TimelineRecord.Type.Network)
</span><del>-            return new WebInspector.NetworkTimelineOverviewGraph(timeline);
</del><ins>+            return new WebInspector.NetworkTimelineOverviewGraph(timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">         if (timelineType === WebInspector.TimelineRecord.Type.Layout)
</span><del>-            return new WebInspector.LayoutTimelineOverviewGraph(timeline);
</del><ins>+            return new WebInspector.LayoutTimelineOverviewGraph(timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">         if (timelineType === WebInspector.TimelineRecord.Type.Script)
</span><del>-            return new WebInspector.ScriptTimelineOverviewGraph(timeline);
</del><ins>+            return new WebInspector.ScriptTimelineOverviewGraph(timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">         if (timelineType === WebInspector.TimelineRecord.Type.RenderingFrame)
</span><del>-            return new WebInspector.RenderingFrameTimelineOverviewGraph(timeline);
</del><ins>+            return new WebInspector.RenderingFrameTimelineOverviewGraph(timeline, timelineOverview);
</ins><span class="cx"> 
</span><span class="cx">         throw Error(&quot;Can't make a graph for an unknown timeline.&quot;);
</span><span class="cx">     }
</span><span class="lines">@@ -59,9 +59,17 @@
</span><span class="cx">     this._startTime = 0;
</span><span class="cx">     this._endTime = 5;
</span><span class="cx">     this._currentTime = 0;
</span><del>-    this._timelineOverview = null;
</del><ins>+    this._timelineOverview = timelineOverview;
+    this._selectedRecord = null;
+    this._selectedRecordChanged = false;
+    this._scheduledLayoutUpdateIdentifier = 0;
+    this._scheduledSelectedRecordLayoutUpdateIdentifier = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.TimelineOverviewGraph.Event = {
+    RecordSelected: &quot;timeline-overview-graph-record-selected&quot;
+};
+
</ins><span class="cx"> WebInspector.TimelineOverviewGraph.prototype = {
</span><span class="cx">     constructor: WebInspector.TimelineOverviewGraph,
</span><span class="cx">     __proto__: WebInspector.Object.prototype,
</span><span class="lines">@@ -136,16 +144,27 @@
</span><span class="cx">         return this._timelineOverview;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set timelineOverview(x)
</del><ins>+    get visible()
</ins><span class="cx">     {
</span><del>-        this._timelineOverview = x;
</del><ins>+        return this._visible;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    get visible()
</del><ins>+    get selectedRecord()
</ins><span class="cx">     {
</span><del>-        return this._visible;
</del><ins>+        return this._selectedRecord;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    set selectedRecord(x)
+    {
+        if (this._selectedRecord === x)
+            return;
+
+        this._selectedRecord = x;
+        this._selectedRecordChanged = true;
+
+        this._needsSelectedRecordLayout();
+    },
+
</ins><span class="cx">     shown: function()
</span><span class="cx">     {
</span><span class="cx">         this._visible = true;
</span><span class="lines">@@ -166,7 +185,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (this._scheduledLayoutUpdateIdentifier) {
</span><span class="cx">             cancelAnimationFrame(this._scheduledLayoutUpdateIdentifier);
</span><del>-            delete this._scheduledLayoutUpdateIdentifier;
</del><ins>+            this._scheduledLayoutUpdateIdentifier = 0;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Implemented by sub-classes if needed.
</span><span class="lines">@@ -190,5 +209,41 @@
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         this._scheduledLayoutUpdateIdentifier = requestAnimationFrame(this.updateLayout.bind(this));
</span><ins>+    },
+
+    dispatchSelectedRecordChangedEvent: function()
+    {
+        if (!this._selectedRecordChanged)
+            return;
+
+        this._selectedRecordChanged = false;
+
+        this.dispatchEventToListeners(WebInspector.TimelineOverviewGraph.Event.RecordSelected, {record: this.selectedRecord});
+    },
+
+    updateSelectedRecord: function()
+    {
+        // Implemented by sub-classes if needed.
+    },
+
+    // Private
+
+    _needsSelectedRecordLayout: function()
+    {
+        // If layout is scheduled, abort since the selected record will be updated when layout happens.
+        if (this._scheduledLayoutUpdateIdentifier)
+            return;
+
+        if (this._scheduledSelectedRecordLayoutUpdateIdentifier)
+            return;
+
+        function update()
+        {
+            this._scheduledSelectedRecordLayoutUpdateIdentifier = 0;
+
+            this.updateSelectedRecord();
+        }
+
+        this._scheduledSelectedRecordLayoutUpdateIdentifier = requestAnimationFrame(update.bind(this));
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordFramecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.css (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.css        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.css        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -31,7 +31,9 @@
</span><span class="cx">     width: 4px;
</span><span class="cx"> 
</span><span class="cx">     overflow: hidden;
</span><ins>+}
</ins><span class="cx"> 
</span><ins>+.timeline-record-frame.tall {
</ins><span class="cx">     -webkit-mask-image: -webkit-linear-gradient(hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 1) 10%);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -47,6 +49,18 @@
</span><span class="cx">     box-sizing: border-box;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.timeline-record-frame.selected {
+    background: -webkit-linear-gradient(left, hsl(210, 98%, 96%), hsl(210, 98%, 96%)) no-repeat 1px -1px;
+}
+
+body.window-inactive .timeline-record-frame.selected {
+    background: -webkit-linear-gradient(left, hsl(0, 0%, 96%), hsl(0, 0%, 96%)) no-repeat 1px -1px;
+}
+
+.timeline-record-frame.selected &gt; .frame {
+    box-shadow: 0 -1px 0 white;
+}
+
</ins><span class="cx"> .timeline-record-frame &gt; .frame &gt; .duration {
</span><span class="cx">     box-sizing: border-box;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordFramejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -63,6 +63,19 @@
</span><span class="cx">         this._record = record;
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    get selected()
+    {
+        return this._element.classList.contains(&quot;selected&quot;);
+    },
+
+    set selected(x)
+    {
+        if (this.selected === x)
+            return;
+
+        this._element.classList.toggle(&quot;selected&quot;);
+    },
+
</ins><span class="cx">     refresh(graphDataSource)
</span><span class="cx">     {
</span><span class="cx">         if (!this._record)
</span><span class="lines">@@ -235,8 +248,14 @@
</span><span class="cx">             this._record.__displayData.graphHeightSeconds = graphDataSource.graphHeightSeconds;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        this._updateElementPosition(frameElement, this._record.__displayData.frameDuration / graphDataSource.graphHeightSeconds, &quot;height&quot;);
</del><ins>+        var frameHeight = this._record.__displayData.frameDuration / graphDataSource.graphHeightSeconds;
+        if (frameHeight &gt;= 0.95)
+            this._element.classList.add(&quot;tall&quot;);
+        else
+            this._element.classList.remove(&quot;tall&quot;);
</ins><span class="cx"> 
</span><ins>+        this._updateElementPosition(frameElement, frameHeight, &quot;height&quot;);
+
</ins><span class="cx">         for (var segment of this._record.__displayData.segments) {
</span><span class="cx">             var element = document.createElement(&quot;div&quot;);
</span><span class="cx">             this._updateElementPosition(element, segment.duration / this._record.__displayData.frameDuration, &quot;height&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (187467 => 187468)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2015-07-28 00:12:24 UTC (rev 187467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2015-07-28 00:13:47 UTC (rev 187468)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">     this._renderingFrameTimelineOverview = new WebInspector.RenderingFrameTimelineOverview(this._recording);
</span><span class="cx">     this._renderingFrameTimelineOverview.addEventListener(WebInspector.TimelineOverview.Event.TimeRangeSelectionChanged, this._timeRangeSelectionChanged, this);
</span><ins>+    this._renderingFrameTimelineOverview.addEventListener(WebInspector.TimelineOverview.Event.RecordSelected, this._recordSelected, this);
</ins><span class="cx"> 
</span><span class="cx">     this._currentTimelineOverview = this._linearTimelineOverview;
</span><span class="cx">     this.element.appendChild(this._currentTimelineOverview.element);
</span><span class="lines">@@ -367,7 +368,15 @@
</span><span class="cx">     {
</span><span class="cx">         if (event.target !== this._contentViewContainer.currentContentView)
</span><span class="cx">             return;
</span><ins>+
</ins><span class="cx">         this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
</span><ins>+
+        if (this.currentTimelineView === this._overviewTimelineView)
+            return;
+
+        var recordPathComponent = this.selectionPathComponents.find(function(element) { return element.representedObject instanceof WebInspector.TimelineRecord; });
+        var record = recordPathComponent ? recordPathComponent.representedObject : null;
+        this._currentTimelineOverview.selectRecord(event.target.representedObject, record);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _contentViewSupplementalRepresentedObjectsDidChange: function(event)
</span><span class="lines">@@ -665,6 +674,32 @@
</span><span class="cx">         }.bind(this));
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    _recordSelected: function(event)
+    {
+        var timelineView = this._timelineViewMap.get(event.data.timeline);
+        console.assert(timelineView === this.currentTimelineView, timelineView);
+        if (timelineView !== this.currentTimelineView)
+            return;
+
+        var selectedTreeElement = this.currentTimelineView.navigationSidebarTreeOutline.selectedTreeElement;
+        if (!event.data.record) {
+            if (selectedTreeElement)
+                selectedTreeElement.deselect();
+            return;
+        }
+
+        var treeElement = this.currentTimelineView.navigationSidebarTreeOutline.findTreeElement(event.data.record);
+        console.assert(treeElement, &quot;Timeline view has no tree element for record selected in timeline overview.&quot;, timelineView, event.data.record);
+        if (!treeElement)
+            return;
+
+        // Don't select the record's tree element if one of it's children is already selected.
+        if (selectedTreeElement &amp;&amp; selectedTreeElement.hasAncestor(treeElement))
+            return;
+
+        treeElement.revealAndSelect(false, false, false, true);
+    },
+
</ins><span class="cx">     _updateFrameSelection: function()
</span><span class="cx">     {
</span><span class="cx">         console.assert(this._renderingFrameTimeline);
</span></span></pre>
</div>
</div>

</body>
</html>