<!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>[183764] 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/183764">183764</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-05-04 13:22:55 -0700 (Mon, 04 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Allow closing and reopening the Timelines tab
https://bugs.webkit.org/show_bug.cgi?id=144520
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager): No need for a delay now. Call reset().
(WebInspector.TimelineManager.prototype.reset):
(WebInspector.TimelineManager.delayedWork): Deleted.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype.closed):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.closed): Added. Fixed leak.
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.closed): Added. Fixed leak.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView): Added Timelines.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.closed): Added. Fixed leak.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.closed): Added. Fixed leak.
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.closed):
* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView.prototype.closed): Deleted. Made generic
in ContentBrowserTabContentView.prototype.closed.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.prototype._tabBarItemSelected): Fix a potential exception
when selectedTabBarItem is null.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.closed):
(WebInspector.TimelineSidebarPanel._recordingCreated): Call _addRecording.
(WebInspector.TimelineSidebarPanel._addRecording): Added.
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNewTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsOverviewTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScriptTimelineViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsSearchTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -1,5 +1,47 @@
</span><span class="cx"> 2015-05-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Web Inspector: Allow closing and reopening the Timelines tab
+ https://bugs.webkit.org/show_bug.cgi?id=144520
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector._updateNewTabButtonState):
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager): No need for a delay now. Call reset().
+ (WebInspector.TimelineManager.prototype.reset):
+ (WebInspector.TimelineManager.delayedWork): Deleted.
+ * UserInterface/Views/ContentBrowserTabContentView.js:
+ (WebInspector.ContentBrowserTabContentView):
+ (WebInspector.ContentBrowserTabContentView.prototype.closed):
+ * UserInterface/Views/LayoutTimelineView.js:
+ (WebInspector.LayoutTimelineView.prototype.closed): Added. Fixed leak.
+ * UserInterface/Views/NetworkTimelineView.js:
+ (WebInspector.NetworkTimelineView.prototype.closed): Added. Fixed leak.
+ * UserInterface/Views/NewTabContentView.js:
+ (WebInspector.NewTabContentView): Added Timelines.
+ * UserInterface/Views/OverviewTimelineView.js:
+ (WebInspector.OverviewTimelineView.prototype.closed): Added. Fixed leak.
+ * UserInterface/Views/RenderingFrameTimelineView.js:
+ (WebInspector.RenderingFrameTimelineView.prototype.closed): Added. Fixed leak.
+ * UserInterface/Views/ScriptTimelineView.js:
+ (WebInspector.ScriptTimelineView.prototype.closed):
+ * UserInterface/Views/SearchTabContentView.js:
+ (WebInspector.SearchTabContentView.prototype.closed): Deleted. Made generic
+ in ContentBrowserTabContentView.prototype.closed.
+ * UserInterface/Views/TabBrowser.js:
+ (WebInspector.TabBrowser.prototype._tabBarItemSelected): Fix a potential exception
+ when selectedTabBarItem is null.
+ * UserInterface/Views/TimelineSidebarPanel.js:
+ (WebInspector.TimelineSidebarPanel):
+ (WebInspector.TimelineSidebarPanel.prototype.closed):
+ (WebInspector.TimelineSidebarPanel._recordingCreated): Call _addRecording.
+ (WebInspector.TimelineSidebarPanel._addRecording): Added.
+ * UserInterface/Views/TimelineTabContentView.js:
+ (WebInspector.TimelineTabContentView):
+
+2015-05-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Web Inspector: Switching recordings in the Timeline navigation bar is broken
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=144519
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -430,7 +430,8 @@
</span><span class="cx"> WebInspector._updateNewTabButtonState = function(event)
</span><span class="cx"> {
</span><span class="cx"> var newTabAllowed = this.isNewTabWithTypeAllowed(WebInspector.ConsoleTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.ElementsTabContentView.Type)
</span><del>- || this.isNewTabWithTypeAllowed(WebInspector.ResourcesTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.StorageTabContentView.Type);
</del><ins>+ || this.isNewTabWithTypeAllowed(WebInspector.ResourcesTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.StorageTabContentView.Type)
+ || this.isNewTabWithTypeAllowed(WebInspector.TimelineTabContentView.Type);
</ins><span class="cx"> this.tabBar.newTabItem.disabled = !newTabAllowed;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -33,25 +33,26 @@
</span><span class="cx"> WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
</span><span class="cx"> WebInspector.Frame.addEventListener(WebInspector.Frame.Event.ResourceWasAdded, this._resourceWasAdded, this);
</span><span class="cx">
</span><del>- this._recordings = [];
- this._activeRecording = null;
</del><span class="cx"> this._isCapturing = false;
</span><ins>+ this._boundStopCapturing = this.stopCapturing.bind(this);
</ins><span class="cx">
</span><del>- this._nextRecordingIdentifier = 1;
</del><ins>+ this.reset();
+ }
</ins><span class="cx">
</span><del>- this._boundStopCapturing = this.stopCapturing.bind(this);
</del><ins>+ // Public
</ins><span class="cx">
</span><del>- function delayedWork()
- {
- this._loadNewRecording();
- }
</del><ins>+ reset()
+ {
+ if (this._isCapturing)
+ this.stopCapturing();
</ins><span class="cx">
</span><del>- // Allow other code to set up listeners before firing the initial RecordingLoaded event.
- setTimeout(delayedWork.bind(this), 0);
</del><ins>+ this._recordings = [];
+ this._activeRecording = null;
+ this._nextRecordingIdentifier = 1;
+
+ this._loadNewRecording();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // Public
-
</del><span class="cx"> // The current recording that new timeline records will be appended to, if any.
</span><span class="cx"> get activeRecording()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -41,6 +41,10 @@
</span><span class="cx"> this._contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentRepresentedObjectsDidChange, this.showDetailsSidebarPanels, this);
</span><span class="cx"> this._contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
</span><span class="cx">
</span><ins>+ // If any content views were shown during sidebar construction, contentBrowserTreeElementForRepresentedObject() would have returned null.
+ // Explicitly update the path for the navigation bar to prevent it from showing up as blank.
+ this._contentBrowser.updateHierarchicalPathForCurrentContentView();
+
</ins><span class="cx"> if (navigationSidebarPanel) {
</span><span class="cx"> var showToolTip = WebInspector.UIString("Show the navigation sidebar (%s)").format(WebInspector.navigationSidebarKeyboardShortcut.displayName);
</span><span class="cx"> var hideToolTip = WebInspector.UIString("Hide the navigation sidebar (%s)").format(WebInspector.navigationSidebarKeyboardShortcut.displayName);
</span><span class="lines">@@ -111,6 +115,9 @@
</span><span class="cx"> WebInspector.navigationSidebar.removeEventListener(null, null, this);
</span><span class="cx"> WebInspector.detailsSidebar.removeEventListener(null, null, this);
</span><span class="cx">
</span><ins>+ if (this.navigationSidebarPanel && typeof this.navigationSidebarPanel.closed === "function")
+ this.navigationSidebarPanel.closed();
+
</ins><span class="cx"> this._contentBrowser.contentViewContainer.closeAllContentViews();
</span><span class="cx"> },
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -123,6 +123,12 @@
</span><span class="cx"> WebInspector.ContentView.prototype.hidden.call(this);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closed: function()
+ {
+ console.assert(this.representedObject instanceof WebInspector.Timeline);
+ this.representedObject.removeEventListener(null, null, this);
+ },
+
</ins><span class="cx"> filterDidChange: function()
</span><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineView.prototype.filterDidChange.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -125,6 +125,12 @@
</span><span class="cx"> WebInspector.ContentView.prototype.hidden.call(this);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closed: function()
+ {
+ console.assert(this.representedObject instanceof WebInspector.Timeline);
+ this.representedObject.removeEventListener(null, null, this);
+ },
+
</ins><span class="cx"> updateLayout: function()
</span><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineView.prototype.updateLayout.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNewTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> var allowedNewTabs = [
</span><span class="cx"> {image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type},
</span><span class="cx"> {image: "Images/Resources.svg", title: WebInspector.UIString("Resources"), type: WebInspector.ResourcesTabContentView.Type},
</span><ins>+ {image: "Images/Timeline.svg", title: WebInspector.UIString("Timelines"), type: WebInspector.TimelineTabContentView.Type},
</ins><span class="cx"> {image: "Images/Storage.svg", title: WebInspector.UIString("Storage"), type: WebInspector.StorageTabContentView.Type},
</span><span class="cx"> {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type}
</span><span class="cx"> ];
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsOverviewTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/OverviewTimelineView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -88,6 +88,12 @@
</span><span class="cx"> this._treeOutlineDataGridSynchronizer.synchronize();
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closed: function()
+ {
+ this._networkTimeline.removeEventListener(null, null, this);
+ this._recording.removeEventListener(null, null, this);
+ },
+
</ins><span class="cx"> updateLayout: function()
</span><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineView.prototype.updateLayout.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsRenderingFrameTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -96,6 +96,12 @@
</span><span class="cx"> WebInspector.ContentView.prototype.hidden.call(this);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closed: function()
+ {
+ console.assert(this.representedObject instanceof WebInspector.Timeline);
+ this.representedObject.removeEventListener(null, null, this);
+ },
+
</ins><span class="cx"> updateLayout: function()
</span><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineView.prototype.updateLayout.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScriptTimelineViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -101,6 +101,12 @@
</span><span class="cx"> WebInspector.ContentView.prototype.hidden.call(this);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closed: function()
+ {
+ console.assert(this.representedObject instanceof WebInspector.Timeline);
+ this.representedObject.removeEventListener(null, null, this);
+ },
+
</ins><span class="cx"> updateLayout: function()
</span><span class="cx"> {
</span><span class="cx"> WebInspector.TimelineView.prototype.updateLayout.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsSearchTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -54,13 +54,6 @@
</span><span class="cx"> setTimeout(this.focusSearchField.bind(this));
</span><span class="cx"> },
</span><span class="cx">
</span><del>- closed: function()
- {
- WebInspector.ContentBrowserTabContentView.prototype.closed.call(this);
-
- this.navigationSidebarPanel.closed();
- },
-
</del><span class="cx"> canShowRepresentedObject: function(representedObject)
</span><span class="cx"> {
</span><span class="cx"> return representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.DOMTree;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx">
</span><span class="cx"> _tabBarItemSelected(event)
</span><span class="cx"> {
</span><del>- var tabContentView = this._tabBar.selectedTabBarItem.representedObject;
</del><ins>+ var tabContentView = this._tabBar.selectedTabBarItem ? this._tabBar.selectedTabBarItem.representedObject : null;
</ins><span class="cx">
</span><span class="cx"> if (tabContentView) {
</span><span class="cx"> this._recentTabContentViews.remove(tabContentView);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -147,6 +147,14 @@
</span><span class="cx"> this.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
</span><span class="cx"> WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStarted, this._capturingStarted, this);
</span><span class="cx"> WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._capturingStopped, this);
</span><ins>+
+ for (var recording of WebInspector.timelineManager.recordings)
+ this._addRecording(recording);
+
+ this._recordingCountChanged();
+
+ if (WebInspector.timelineManager.activeRecording)
+ this._recordingLoaded();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="lines">@@ -162,6 +170,15 @@
</span><span class="cx"> this._refreshFrameSelectionChart();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ closed()
+ {
+ WebInspector.showReplayInterfaceSetting.removeEventListener(null, null, this);
+ WebInspector.replayManager.removeEventListener(null, null, this);
+ WebInspector.timelineManager.removeEventListener(null, null, this);
+
+ WebInspector.timelineManager.reset();
+ }
+
</ins><span class="cx"> get viewMode()
</span><span class="cx"> {
</span><span class="cx"> return this._viewMode;
</span><span class="lines">@@ -446,14 +463,17 @@
</span><span class="cx">
</span><span class="cx"> _recordingCreated(event)
</span><span class="cx"> {
</span><del>- var recording = event.data.recording;
</del><ins>+ this._addRecording(event.data.recording)
+ this._recordingCountChanged();
+ }
+
+ _addRecording(recording)
+ {
</ins><span class="cx"> console.assert(recording instanceof WebInspector.TimelineRecording, recording);
</span><span class="cx">
</span><span class="cx"> var recordingTreeElement = new WebInspector.GeneralTreeElement(WebInspector.TimelineSidebarPanel.StopwatchIconStyleClass, recording.displayName, null, recording);
</span><span class="cx"> this._recordingTreeElementMap.set(recording, recordingTreeElement);
</span><span class="cx"> this._recordingsTreeOutline.appendChild(recordingTreeElement);
</span><del>-
- this._recordingCountChanged();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _recordingCountChanged()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (183763 => 183764)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js        2015-05-04 20:11:58 UTC (rev 183763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js        2015-05-04 20:22:55 UTC (rev 183764)
</span><span class="lines">@@ -28,9 +28,6 @@
</span><span class="cx"> var tabBarItem = new WebInspector.TabBarItem("Images/Timeline.svg", WebInspector.UIString("Timelines"));
</span><span class="cx"> var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];
</span><span class="cx">
</span><del>- // FIME: Until TimelineSidebarPanel supports instantiating after inspector launch, disable closing.
- tabBarItem.hideCloseButton = true;
-
</del><span class="cx"> WebInspector.ContentBrowserTabContentView.call(this, identifier || "timeline", "timeline", tabBarItem, WebInspector.TimelineSidebarPanel, detailsSidebarPanels);
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>