<!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>[200873] 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/200873">200873</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2016-05-13 12:01:34 -0700 (Fri, 13 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Script ProfileViews should be searchable
https://bugs.webkit.org/show_bug.cgi?id=157581
<rdar://problem/26228530>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.get filterText):
Make filterText readable.
* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
(WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
Add filterable data for the "function" column.
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
Renamed callingContextTreeNode to be less ambiguous.
* UserInterface/Views/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView.prototype.get dataGrid):
Expose data grid for use in parent view.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
Drive-by fix: forward property to current child TimelineView.
* UserInterface/Views/ScriptProfileTimelineView.js:
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
(WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
Helper function to switch profile views. Persist filter text when
switching to the new profile view.
(WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
Remove FIXME and show filter bar.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.setupDataGrid):
Support switching to a new data grid.
(WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
Hooking up filtering causes data grid nodes to be filtered based on the
ruler selection. Although ScriptProfileTimelineView performs its own
time-based filtering, this is necessary to prevent an assert.
(WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
(WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
Converted arrow functions to member functions to allow unregistering
event listeners on outgoing data grid when swapping grids.</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="#trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridTreejs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridTree.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProfileViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScriptClusterTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScriptProfileTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2016-05-13 Matt Baker <mattbaker@apple.com>
+
+ Web Inspector: Script ProfileViews should be searchable
+ https://bugs.webkit.org/show_bug.cgi?id=157581
+ <rdar://problem/26228530>
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/DataGrid.js:
+ (WebInspector.DataGrid.prototype.get filterText):
+ Make filterText readable.
+
+ * UserInterface/Views/ProfileDataGridNode.js:
+ (WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
+ (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
+ Add filterable data for the "function" column.
+ (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
+ (WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
+ Renamed callingContextTreeNode to be less ambiguous.
+
+ * UserInterface/Views/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
+
+ * UserInterface/Views/ProfileView.js:
+ (WebInspector.ProfileView.prototype.get dataGrid):
+ Expose data grid for use in parent view.
+
+ * UserInterface/Views/ScriptClusterTimelineView.js:
+ (WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
+ Drive-by fix: forward property to current child TimelineView.
+
+ * UserInterface/Views/ScriptProfileTimelineView.js:
+ (WebInspector.ScriptProfileTimelineView):
+ (WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
+ (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
+ Helper function to switch profile views. Persist filter text when
+ switching to the new profile view.
+
+ (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
+ Remove FIXME and show filter bar.
+
+ * UserInterface/Views/TimelineView.js:
+ (WebInspector.TimelineView.prototype.setupDataGrid):
+ Support switching to a new data grid.
+ (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
+ Hooking up filtering causes data grid nodes to be filtered based on the
+ ruler selection. Although ScriptProfileTimelineView performs its own
+ time-based filtering, this is necessary to prevent an assert.
+
+ (WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
+ (WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
+ Converted arrow functions to member functions to allow unregistering
+ event listeners on outgoing data grid when swapping grids.
+
</ins><span class="cx"> 2016-05-12 Matt Baker <mattbaker@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove "Extra Scripts" folder from Resources sidebar if all children removed
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -278,6 +278,8 @@
</span><span class="cx"> this._updateScrollListeners();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ get filterText() { return this._filterText; }
+
</ins><span class="cx"> set filterText(x)
</span><span class="cx"> {
</span><span class="cx"> if (this._filterText === x)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="cx">
</span><del>- get node() { return this._node; }
</del><ins>+ get callingContextTreeNode() { return this._node; }
</ins><span class="cx">
</span><span class="cx"> displayName()
</span><span class="cx"> {
</span><span class="lines">@@ -124,6 +124,21 @@
</span><span class="cx"> contextMenu.appendSeparator();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // Protected
+
+ filterableDataForColumn(columnIdentifier)
+ {
+ if (columnIdentifier === "function") {
+ let filterableData = [this.displayName()];
+ let script = WebInspector.debuggerManager.scriptForIdentifier(this._node.sourceID);
+ if (script && script.url && this._node.line >= 0 && this._node.column >= 0)
+ filterableData.push(script.url);
+ return filterableData;
+ }
+
+ return super.filterableDataForColumn(columnIdentifier);
+ }
+
</ins><span class="cx"> // Private
</span><span class="cx">
</span><span class="cx"> _updateChildrenForModifiers()
</span><span class="lines">@@ -174,7 +189,7 @@
</span><span class="cx"> // Remove child data grid nodes that have been charged to us.
</span><span class="cx"> if (!this.shouldRefreshChildren && this._childrenToChargeToSelf.size) {
</span><span class="cx"> for (let childDataGridNode of this.children) {
</span><del>- if (this._childrenToChargeToSelf.has(childDataGridNode.node))
</del><ins>+ if (this._childrenToChargeToSelf.has(childDataGridNode.callingContextTreeNode))
</ins><span class="cx"> this.removeChild(childDataGridNode);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridTreejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridTree.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridTree.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridTree.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">
</span><span class="cx"> _updateCurrentFocusDetails(focusDataGridNode)
</span><span class="cx"> {
</span><del>- let cctNode = focusDataGridNode.node;
</del><ins>+ let cctNode = focusDataGridNode.callingContextTreeNode;
</ins><span class="cx"> let {timestamps, duration} = cctNode.filteredTimestampsAndDuration(this._startTime, this._endTime);
</span><span class="cx">
</span><span class="cx"> this._currentFocusStartTime = timestamps[0];
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileView.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -76,6 +76,7 @@
</span><span class="cx"> get callingContextTree() { return this._callingContextTree; }
</span><span class="cx"> get startTime() { return this._startTime; }
</span><span class="cx"> get endTime() { return this._endTime; }
</span><ins>+ get dataGrid() { return this._dataGrid; }
</ins><span class="cx">
</span><span class="cx"> setStartAndEndTime(startTime, endTime)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScriptClusterTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -71,6 +71,8 @@
</span><span class="cx"> set endTime(x) { this._contentViewContainer.currentContentView.endTime = x; }
</span><span class="cx"> get currentTime() { return this._contentViewContainer.currentContentView.currentTime; }
</span><span class="cx"> set currentTime(x) { this._contentViewContainer.currentContentView.currentTime = x; }
</span><ins>+
+ selectRecord(record) { this._contentViewContainer.currentContentView.selectRecord(record); }
</ins><span class="cx"> updateFilter(filters) { return this._contentViewContainer.currentContentView.updateFilter(filters); }
</span><span class="cx"> filterDidChange() { return this._contentViewContainer.currentContentView.filterDidChange(); }
</span><span class="cx"> matchDataGridNodeAgainstCustomFilters(node) { return this._contentViewContainer.currentContentView.matchDataGridNodeAgainstCustomFilters(node); }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScriptProfileTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -42,10 +42,7 @@
</span><span class="cx"> if (!WebInspector.ScriptProfileTimelineView.profileOrientationSetting)
</span><span class="cx"> WebInspector.ScriptProfileTimelineView.profileOrientationSetting = new WebInspector.Setting("script-profile-timeline-view-profile-orientation-setting", WebInspector.ScriptProfileTimelineView.ProfileOrientation.TopDown);
</span><span class="cx">
</span><del>- let callingContextTree = this._callingContextTreeForOrientation(WebInspector.ScriptProfileTimelineView.profileOrientationSetting.value);
- this._profileView = new WebInspector.ProfileView(callingContextTree);
- this._profileView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._profileViewSelectionPathComponentsDidChange, this);
- this.addSubview(this._profileView);
</del><ins>+ this._showProfileViewForOrientation(WebInspector.ScriptProfileTimelineView.profileOrientationSetting.value);
</ins><span class="cx">
</span><span class="cx"> let scopeBarItems = [
</span><span class="cx"> new WebInspector.ScopeBarItem(WebInspector.ScriptProfileTimelineView.ProfileOrientation.TopDown, WebInspector.UIString("Top Down"), true),
</span><span class="lines">@@ -61,17 +58,12 @@
</span><span class="cx"> this._updateClearFocusNodesButtonItem();
</span><span class="cx">
</span><span class="cx"> timeline.addEventListener(WebInspector.Timeline.Event.Refreshed, this._scriptTimelineRecordRefreshed, this);
</span><del>-
- // FIXME: Support filtering the ProfileView.
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="cx">
</span><span class="cx"> get showsLiveRecordingData() { return false; }
</span><span class="cx">
</span><del>- // FIXME: <https://webkit.org/b/157581> Web Inspector: Script ProfileViews should be searchable
- get showsFilterBar() { return false; }
-
</del><span class="cx"> // Protected
</span><span class="cx">
</span><span class="cx"> closed()
</span><span class="lines">@@ -130,22 +122,34 @@
</span><span class="cx"> {
</span><span class="cx"> let currentOrientation = WebInspector.ScriptProfileTimelineView.profileOrientationSetting.value;
</span><span class="cx"> let newOrientation = this._profileOrientationScopeBar.selectedItems[0].id;
</span><del>- let callingContextTree = this._callingContextTreeForOrientation(newOrientation);
</del><span class="cx">
</span><span class="cx"> WebInspector.ScriptProfileTimelineView.profileOrientationSetting.value = newOrientation;
</span><ins>+ this._showProfileViewForOrientation(newOrientation);
</ins><span class="cx">
</span><del>- this.removeSubview(this._profileView);
- this._profileView.removeEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._profileViewSelectionPathComponentsDidChange, this);
</del><ins>+ this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
</ins><span class="cx">
</span><ins>+ this._forceNextLayout = true;
+ this.needsLayout();
+ }
+
+ _showProfileViewForOrientation(orientation)
+ {
+ let filterText;
+ if (this._profileView) {
+ this._profileView.removeEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._profileViewSelectionPathComponentsDidChange, this);
+ this.removeSubview(this._profileView);
+ filterText = this._profileView.dataGrid.filterText;
+ }
+
+ let callingContextTree = this._callingContextTreeForOrientation(orientation);
</ins><span class="cx"> this._profileView = new WebInspector.ProfileView(callingContextTree);
</span><ins>+ this._profileView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._profileViewSelectionPathComponentsDidChange, this);
</ins><span class="cx">
</span><del>- this._profileView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._profileViewSelectionPathComponentsDidChange, this);
</del><span class="cx"> this.addSubview(this._profileView);
</span><ins>+ this.setupDataGrid(this._profileView.dataGrid);
</ins><span class="cx">
</span><del>- this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
-
- this._forceNextLayout = true;
- this.needsLayout();
</del><ins>+ if (filterText)
+ this._profileView.dataGrid.filterText = filterText;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _updateClearFocusNodesButtonItem()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (200872 => 200873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js        2016-05-13 18:57:38 UTC (rev 200872)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js        2016-05-13 19:01:34 UTC (rev 200873)
</span><span class="lines">@@ -158,25 +158,18 @@
</span><span class="cx">
</span><span class="cx"> setupDataGrid(dataGrid)
</span><span class="cx"> {
</span><del>- console.assert(!this._timelineDataGrid);
</del><ins>+ if (this._timelineDataGrid) {
+ this._timelineDataGrid.filterDelegate = null;
+ this._timelineDataGrid.removeEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._timelineDataGridSelectedNodeChanged, this);
+ this._timelineDataGrid.removeEventListener(WebInspector.DataGrid.Event.NodeWasFiltered, this._timelineDataGridNodeWasFiltered, this);
+ this._timelineDataGrid.removeEventListener(WebInspector.DataGrid.Event.FilterDidChange, this.filterDidChange, this);
+ }
</ins><span class="cx">
</span><span class="cx"> this._timelineDataGrid = dataGrid;
</span><span class="cx"> this._timelineDataGrid.filterDelegate = this;
</span><del>- this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, () => {
- this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
- });
-
- this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.NodeWasFiltered, (event) => {
- let node = event.data.node;
- if (!(node instanceof WebInspector.TimelineDataGridNode))
- return;
-
- this.dispatchEventToListeners(WebInspector.TimelineView.Event.RecordWasFiltered, {record: node.record, filtered: node.hidden});
- });
-
- this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.FilterDidChange, (event) => {
- this.filterDidChange();
- });
</del><ins>+ this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._timelineDataGridSelectedNodeChanged, this);
+ this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.NodeWasFiltered, this._timelineDataGridNodeWasFiltered, this);
+ this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.FilterDidChange, this.filterDidChange, this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> selectRecord(record)
</span><span class="lines">@@ -284,6 +277,9 @@
</span><span class="cx"> return checkTimeBounds(record.startTime, record.endTime);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (node instanceof WebInspector.ProfileDataGridNode)
+ return node.callingContextTreeNode.hasStackTraceInTimeRange(startTime, endTime);
+
</ins><span class="cx"> console.error("Unknown DataGridNode, can't filter by time.");
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -302,6 +298,20 @@
</span><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><ins>+ _timelineDataGridSelectedNodeChanged(event)
+ {
+ this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
+ }
+
+ _timelineDataGridNodeWasFiltered(event)
+ {
+ let node = event.data.node;
+ if (!(node instanceof WebInspector.TimelineDataGridNode))
+ return;
+
+ this.dispatchEventToListeners(WebInspector.TimelineView.Event.RecordWasFiltered, {record: node.record, filtered: node.hidden});
+ }
+
</ins><span class="cx"> _timesDidChange()
</span><span class="cx"> {
</span><span class="cx"> if (!WebInspector.timelineManager.isCapturing() || this.showsLiveRecordingData)
</span></span></pre>
</div>
</div>
</body>
</html>