<!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>[186368] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/186368">186368</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-07-06 12:44:23 -0700 (Mon, 06 Jul 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Add a dedicated Network tab that is always live
https://bugs.webkit.org/show_bug.cgi?id=146568
Source/WebCore:
Make sure the executionStopwatch is always started and never stops so resource loads
always get timestamps, even when Timeline is not recording.
Reviewed by Joseph Pecoraro.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::enable): Start executionStopwatch.
(WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
(WebCore::InspectorTimelineAgent::internalStop): Ditto.
Source/WebInspectorUI:
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.isTabTypeAllowed):
(WebInspector._tabContentViewForType):
(WebInspector._updateNewTabButtonState):
Add NetworkTabContentView to the right places.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.get persistentNetworkTimeline):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
Add a persistent network timeline that always has all resources.
* UserInterface/Images/Network.svg: Added.
* UserInterface/Main.html: Added new files.
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
Drive-by fix. The bottom was off by one. This caused misalignment between sidebar and content view when
scrolled all the way to the bottom of the content view.
* UserInterface/Views/NetworkGridContentView.css: Added.
(.content-view.network-grid > .data-grid):
(.content-view.network-grid > .data-grid th):
(.content-view.network-grid > .data-grid td):
(.content-view.network-grid > .data-grid table.data):
Mostly copied from TimelineView.css and NetworkTimelineView.css.
* UserInterface/Views/NetworkGridContentView.js: Added.
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline):
(WebInspector.NetworkGridContentView.prototype.get selectionPathComponents):
(WebInspector.NetworkGridContentView.prototype.get zeroTime):
(WebInspector.NetworkGridContentView.prototype.shown):
(WebInspector.NetworkGridContentView.prototype.hidden):
(WebInspector.NetworkGridContentView.prototype.closed):
(WebInspector.NetworkGridContentView.prototype.updateLayout):
(WebInspector.NetworkGridContentView.prototype.needsLayout):
(WebInspector.NetworkGridContentView.prototype.reset):
(WebInspector.NetworkGridContentView.prototype._processPendingRecords):
(WebInspector.NetworkGridContentView.prototype._networkTimelineReset):
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkGridContentView.prototype._treeElementPathComponentSelected):
(WebInspector.NetworkGridContentView.prototype._dataGridNodeSelected):
Mostly copied from NetworkTimelineView.
* UserInterface/Views/NetworkSidebarPanel.css: Added.
(.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.network > .navigation-bar):
(.sidebar > .panel.navigation.network > .title-bar):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
(.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button):
(.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle):
(.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
Mostly copied from TimelineSidebarPanel.css and NetworkTimelineView.css.
* UserInterface/Views/NetworkSidebarPanel.js: Added.
(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype.closed):
(WebInspector.NetworkSidebarPanel.prototype.showDefaultContentView):
(WebInspector.NetworkSidebarPanel.prototype.saveStateToCookie):
(WebInspector.NetworkSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.NetworkSidebarPanel.prototype.hasCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
(WebInspector.NetworkSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
(WebInspector.NetworkSidebarPanel.prototype._treeElementCloseButtonClicked):
(WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView):
(WebInspector.NetworkSidebarPanel.prototype._treeElementSelected):
(WebInspector.NetworkSidebarPanel.prototype._scopeBarSelectionDidChange):
A hybrid of ResourceSidebarPanel and TimelineSidebarPanel.
* UserInterface/Views/NetworkTabContentView.js: Added.
(WebInspector.NetworkTabContentView):
(WebInspector.NetworkTabContentView.prototype.get type):
(WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView): Add Network tab and sort the tabs by their localized name.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype._handleNewTabClick):
Drive-by fix. Don't fire the click event if the new tab button is disabled.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorPageAgentcpp">trunk/Source/WebCore/inspector/InspectorPageAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorTimelineAgentcpp">trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#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="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsTimelinejs">trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNavigationSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNewTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabBarjs">trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesNetworksvg">trunk/Source/WebInspectorUI/UserInterface/Images/Network.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebCore/ChangeLog        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-07-04 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Add a dedicated Network tab that is always live
+ https://bugs.webkit.org/show_bug.cgi?id=146568
+
+ Make sure the executionStopwatch is always started and never stops so resource loads
+ always get timestamps, even when Timeline is not recording.
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
+ (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
+ (WebCore::InspectorTimelineAgent::internalStop): Ditto.
+
</ins><span class="cx"> 2015-07-02 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Update the localized strings file.
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorPageAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -367,6 +367,8 @@
</span><span class="cx"> m_enabled = true;
</span><span class="cx"> m_instrumentingAgents->setInspectorPageAgent(this);
</span><span class="cx">
</span><ins>+ m_instrumentingAgents->inspectorEnvironment().executionStopwatch()->start();
+
</ins><span class="cx"> if (Frame* frame = mainFrame())
</span><span class="cx"> m_originalScriptExecutionDisabled = !frame->settings().isScriptEnabled();
</span><span class="cx"> }
</span><span class="lines">@@ -819,6 +821,12 @@
</span><span class="cx">
</span><span class="cx"> void InspectorPageAgent::frameStartedLoading(Frame& frame)
</span><span class="cx"> {
</span><ins>+ if (frame.isMainFrame()) {
+ auto stopwatch = m_instrumentingAgents->inspectorEnvironment().executionStopwatch();
+ stopwatch->reset();
+ stopwatch->start();
+ }
+
</ins><span class="cx"> m_frontendDispatcher->frameStartedLoading(frameId(&frame));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorTimelineAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -140,11 +140,6 @@
</span><span class="cx"> else
</span><span class="cx"> m_maxCallStackDepth = 5;
</span><span class="cx">
</span><del>- // If the debugger is paused the environment's stopwatch will be stopped, and shouldn't be
- // restarted until the debugger continues.
- if (!m_scriptDebugServer->isPaused())
- m_instrumentingAgents->inspectorEnvironment().executionStopwatch()->start();
-
</del><span class="cx"> m_instrumentingAgents->setInspectorTimelineAgent(this);
</span><span class="cx">
</span><span class="cx"> if (m_scriptDebugServer)
</span><span class="lines">@@ -198,11 +193,6 @@
</span><span class="cx"> if (!m_enabled)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- // The environment's stopwatch could be already stopped if the debugger has paused.
- auto stopwatch = m_instrumentingAgents->inspectorEnvironment().executionStopwatch();
- if (stopwatch->isActive())
- stopwatch->stop();
-
</del><span class="cx"> m_instrumentingAgents->setInspectorTimelineAgent(nullptr);
</span><span class="cx">
</span><span class="cx"> if (m_scriptDebugServer)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -1,3 +1,104 @@
</span><ins>+2015-07-02 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Add a dedicated Network tab that is always live
+ https://bugs.webkit.org/show_bug.cgi?id=146568
+
+ Reviewed by Joseph Pecoraro.
+
+ * Localizations/en.lproj/localizedStrings.js: Updated.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.loaded):
+ (WebInspector.isTabTypeAllowed):
+ (WebInspector._tabContentViewForType):
+ (WebInspector._updateNewTabButtonState):
+ Add NetworkTabContentView to the right places.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager):
+ (WebInspector.TimelineManager.prototype.get persistentNetworkTimeline):
+ (WebInspector.TimelineManager.prototype._mainResourceDidChange):
+ (WebInspector.TimelineManager.prototype._resourceWasAdded):
+ Add a persistent network timeline that always has all resources.
+
+ * UserInterface/Images/Network.svg: Added.
+
+ * UserInterface/Main.html: Added new files.
+
+ * UserInterface/Views/NavigationSidebarPanel.css:
+ (.sidebar > .panel.navigation > .content):
+ Drive-by fix. The bottom was off by one. This caused misalignment between sidebar and content view when
+ scrolled all the way to the bottom of the content view.
+
+ * UserInterface/Views/NetworkGridContentView.css: Added.
+ (.content-view.network-grid > .data-grid):
+ (.content-view.network-grid > .data-grid th):
+ (.content-view.network-grid > .data-grid td):
+ (.content-view.network-grid > .data-grid table.data):
+ Mostly copied from TimelineView.css and NetworkTimelineView.css.
+
+ * UserInterface/Views/NetworkGridContentView.js: Added.
+ (WebInspector.NetworkGridContentView):
+ (WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline):
+ (WebInspector.NetworkGridContentView.prototype.get selectionPathComponents):
+ (WebInspector.NetworkGridContentView.prototype.get zeroTime):
+ (WebInspector.NetworkGridContentView.prototype.shown):
+ (WebInspector.NetworkGridContentView.prototype.hidden):
+ (WebInspector.NetworkGridContentView.prototype.closed):
+ (WebInspector.NetworkGridContentView.prototype.updateLayout):
+ (WebInspector.NetworkGridContentView.prototype.needsLayout):
+ (WebInspector.NetworkGridContentView.prototype.reset):
+ (WebInspector.NetworkGridContentView.prototype._processPendingRecords):
+ (WebInspector.NetworkGridContentView.prototype._networkTimelineReset):
+ (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
+ (WebInspector.NetworkGridContentView.prototype._treeElementPathComponentSelected):
+ (WebInspector.NetworkGridContentView.prototype._dataGridNodeSelected):
+ Mostly copied from NetworkTimelineView.
+
+ * UserInterface/Views/NetworkSidebarPanel.css: Added.
+ (.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder)):
+ (.sidebar > .panel.navigation.network > .navigation-bar):
+ (.sidebar > .panel.navigation.network > .title-bar):
+ (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
+ (.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button):
+ (.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button):
+ (.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button):
+ (.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle):
+ (.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline):
+ (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
+ Mostly copied from TimelineSidebarPanel.css and NetworkTimelineView.css.
+
+ * UserInterface/Views/NetworkSidebarPanel.js: Added.
+ (WebInspector.NetworkSidebarPanel):
+ (WebInspector.NetworkSidebarPanel.prototype.closed):
+ (WebInspector.NetworkSidebarPanel.prototype.showDefaultContentView):
+ (WebInspector.NetworkSidebarPanel.prototype.saveStateToCookie):
+ (WebInspector.NetworkSidebarPanel.prototype.restoreStateFromCookie):
+ (WebInspector.NetworkSidebarPanel.prototype.hasCustomFilters):
+ (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
+ (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
+ (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
+ (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
+ (WebInspector.NetworkSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
+ (WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
+ (WebInspector.NetworkSidebarPanel.prototype._treeElementCloseButtonClicked):
+ (WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView):
+ (WebInspector.NetworkSidebarPanel.prototype._treeElementSelected):
+ (WebInspector.NetworkSidebarPanel.prototype._scopeBarSelectionDidChange):
+ A hybrid of ResourceSidebarPanel and TimelineSidebarPanel.
+
+ * UserInterface/Views/NetworkTabContentView.js: Added.
+ (WebInspector.NetworkTabContentView):
+ (WebInspector.NetworkTabContentView.prototype.get type):
+ (WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
+
+ * UserInterface/Views/NewTabContentView.js:
+ (WebInspector.NewTabContentView): Add Network tab and sort the tabs by their localized name.
+
+ * UserInterface/Views/TabBar.js:
+ (WebInspector.TabBar.prototype._handleNewTabClick):
+ Drive-by fix. Don't fire the click event if the new tab button is disabled.
+
</ins><span class="cx"> 2015-07-06 Nikita Vasilyev <nvasilyev@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Mark console filters that have unseen messages by colored dots
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -320,6 +320,7 @@
</span><span class="cx"> localizedStrings["Metrics"] = "Metrics";
</span><span class="cx"> localizedStrings["Mixed"] = "Mixed";
</span><span class="cx"> localizedStrings["Name"] = "Name";
</span><ins>+localizedStrings["Network"] = "Network";
</ins><span class="cx"> localizedStrings["Network Issue"] = "Network Issue";
</span><span class="cx"> localizedStrings["Network Requests"] = "Network Requests";
</span><span class="cx"> localizedStrings["New Rule"] = "New Rule";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> this._showingSplitConsoleSetting = new WebInspector.Setting("showing-split-console", false);
</span><span class="cx"> this._splitConsoleHeightSetting = new WebInspector.Setting("split-console-height", 150);
</span><span class="cx">
</span><del>- this._openTabsSetting = new WebInspector.Setting("open-tabs", ["elements", "resources", "timeline", "debugger", "storage", "console"]);
</del><ins>+ this._openTabsSetting = new WebInspector.Setting("open-tab-types", ["elements", "network", "resources", "timeline", "debugger", "storage", "console"]);
</ins><span class="cx"> this._selectedTabIndexSetting = new WebInspector.Setting("selected-tab-index", 0);
</span><span class="cx">
</span><span class="cx"> this.showShadowDOMSetting = new WebInspector.Setting("show-shadow-dom", false);
</span><span class="lines">@@ -383,6 +383,8 @@
</span><span class="cx"> switch (tabType) {
</span><span class="cx"> case WebInspector.ElementsTabContentView.Type:
</span><span class="cx"> return !!window.DOMAgent;
</span><ins>+ case WebInspector.NetworkTabContentView.Type:
+ return !!window.NetworkAgent && !!window.PageAgent;
</ins><span class="cx"> case WebInspector.StorageTabContentView.Type:
</span><span class="cx"> return !!window.DOMStorageAgent || !!window.DatabaseAgent || !!window.IndexedDBAgent;
</span><span class="cx"> case WebInspector.TimelineTabContentView.Type:
</span><span class="lines">@@ -401,6 +403,8 @@
</span><span class="cx"> return new WebInspector.DebuggerTabContentView;
</span><span class="cx"> case WebInspector.ElementsTabContentView.Type:
</span><span class="cx"> return new WebInspector.ElementsTabContentView;
</span><ins>+ case WebInspector.NetworkTabContentView.Type:
+ return new WebInspector.NetworkTabContentView;
</ins><span class="cx"> case WebInspector.NewTabContentView.Type:
</span><span class="cx"> return new WebInspector.NewTabContentView;
</span><span class="cx"> case WebInspector.ResourcesTabContentView.Type:
</span><span class="lines">@@ -439,7 +443,8 @@
</span><span class="cx"> {
</span><span class="cx"> var newTabAllowed = this.isNewTabWithTypeAllowed(WebInspector.ConsoleTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.ElementsTabContentView.Type)
</span><span class="cx"> || this.isNewTabWithTypeAllowed(WebInspector.ResourcesTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.StorageTabContentView.Type)
</span><del>- || this.isNewTabWithTypeAllowed(WebInspector.TimelineTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.DebuggerTabContentView.Type);
</del><ins>+ || this.isNewTabWithTypeAllowed(WebInspector.TimelineTabContentView.Type) || this.isNewTabWithTypeAllowed(WebInspector.DebuggerTabContentView.Type)
+ || this.isNewTabWithTypeAllowed(WebInspector.NetworkTabContentView.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 (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -33,6 +33,8 @@
</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><ins>+ this._persistentNetworkTimeline = new WebInspector.NetworkTimeline;
+
</ins><span class="cx"> this._isCapturing = false;
</span><span class="cx"> this._isCapturingPageReload = false;
</span><span class="cx"> this._autoCapturingMainResource = null;
</span><span class="lines">@@ -62,6 +64,11 @@
</span><span class="cx"> return this._activeRecording;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ get persistentNetworkTimeline()
+ {
+ return this._persistentNetworkTimeline;
+ }
+
</ins><span class="cx"> get recordings()
</span><span class="cx"> {
</span><span class="cx"> return this._recordings.slice();
</span><span class="lines">@@ -549,6 +556,14 @@
</span><span class="cx">
</span><span class="cx"> _mainResourceDidChange(event)
</span><span class="cx"> {
</span><ins>+ if (event.target.isMainFrame())
+ this._persistentNetworkTimeline.reset();
+
+ var mainResource = event.target.mainResource;
+ var record = new WebInspector.ResourceTimelineRecord(mainResource);
+ if (!isNaN(record.startTime))
+ this._persistentNetworkTimeline.addRecord(record);
+
</ins><span class="cx"> // Ignore resource events when there isn't a main frame yet. Those events are triggered by
</span><span class="cx"> // loading the cached resources when the inspector opens, and they do not have timing information.
</span><span class="cx"> if (!WebInspector.frameResourceManager.mainFrame)
</span><span class="lines">@@ -560,15 +575,18 @@
</span><span class="cx"> if (!this._isCapturing)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- var mainResource = event.target.mainResource;
</del><span class="cx"> if (mainResource === this._autoCapturingMainResource)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- this._addRecord(new WebInspector.ResourceTimelineRecord(mainResource));
</del><ins>+ this._addRecord(record);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _resourceWasAdded(event)
</span><span class="cx"> {
</span><ins>+ var record = new WebInspector.ResourceTimelineRecord(event.data.resource);
+ if (!isNaN(record.startTime))
+ this._persistentNetworkTimeline.addRecord(record);
+
</ins><span class="cx"> // Ignore resource events when there isn't a main frame yet. Those events are triggered by
</span><span class="cx"> // loading the cached resources when the inspector opens, and they do not have timing information.
</span><span class="cx"> if (!WebInspector.frameResourceManager.mainFrame)
</span><span class="lines">@@ -577,7 +595,7 @@
</span><span class="cx"> if (!this._isCapturing)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- this._addRecord(new WebInspector.ResourceTimelineRecord(event.data.resource));
</del><ins>+ this._addRecord(record);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesNetworksvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Network.svg (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Network.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Network.svg        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <circle cx="8" cy="8" r="7.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 5.5 1.0 L 5.5 10.5" fill="none" stroke="black"/>
+ <path d="M 3.0 9.0 L 5.5 11.0 L 8.0 9.0" fill="none" stroke="black"/>
+ <path d="M 10.5 15.0 L 10.5 5.5" fill="none" stroke="black"/>
+ <path d="M 13.0 7.0 L 10.5 5.0 L 8.0 7.0" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -100,6 +100,8 @@
</span><span class="cx"> <link rel="stylesheet" href="Views/Main.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/NavigationBar.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/NavigationSidebarPanel.css">
</span><ins>+ <link rel="stylesheet" href="Views/NetworkGridContentView.css">
+ <link rel="stylesheet" href="Views/NetworkSidebarPanel.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/NetworkTimelineOverviewGraph.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/NetworkTimelineView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/NewTabContentView.css">
</span><span class="lines">@@ -343,6 +345,7 @@
</span><span class="cx"> <script src="Views/DOMDetailsSidebarPanel.js"></script>
</span><span class="cx"> <script src="Views/FolderTreeElement.js"></script>
</span><span class="cx"> <script src="Views/FolderizedTreeElement.js"></script>
</span><ins>+ <script src="Views/NetworkTabContentView.js"></script>
</ins><span class="cx"> <script src="Views/NewTabContentView.js"></script>
</span><span class="cx"> <script src="Views/ObjectTreeBaseTreeElement.js"></script>
</span><span class="cx"> <script src="Views/SourceCodeTreeElement.js"></script>
</span><span class="lines">@@ -460,6 +463,8 @@
</span><span class="cx"> <script src="Views/MetricsStyleDetailsPanel.js"></script>
</span><span class="cx"> <script src="Views/MultipleScopeBarItem.js"></script>
</span><span class="cx"> <script src="Views/NavigationBar.js"></script>
</span><ins>+ <script src="Views/NetworkGridContentView.js"></script>
+ <script src="Views/NetworkSidebarPanel.js"></script>
</ins><span class="cx"> <script src="Views/NetworkTimelineOverviewGraph.js"></script>
</span><span class="cx"> <script src="Views/NetworkTimelineView.js"></script>
</span><span class="cx"> <script src="Views/ObjectPreviewView.js"></script>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsTimelinejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -106,8 +106,10 @@
</span><span class="cx"> this._startTime = NaN;
</span><span class="cx"> this._endTime = NaN;
</span><span class="cx">
</span><del>- if (!suppressEvents)
</del><ins>+ if (!suppressEvents) {
</ins><span class="cx"> this.dispatchEventToListeners(WebInspector.Timeline.Event.TimesUpdated);
</span><ins>+ this.dispatchEventToListeners(WebInspector.Timeline.Event.Reset);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> addRecord(record)
</span><span class="lines">@@ -154,6 +156,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector.Timeline.Event = {
</span><ins>+ Reset: "timeline-reset",
</ins><span class="cx"> RecordAdded: "timeline-record-added",
</span><span class="cx"> TimesUpdated: "timeline-times-updated"
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNavigationSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> .sidebar > .panel.navigation > .content {
</span><del>- bottom: 28px;
</del><ins>+ bottom: 29px;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .sidebar > .panel.navigation > .filter-bar {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.content-view.network-grid > .data-grid {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+
+.content-view.network-grid > .data-grid th {
+ border-top: none;
+}
+
+.content-view.network-grid > .data-grid td {
+ height: 16px;
+ line-height: 16px;
+}
+
+.content-view.network-grid > .data-grid table.data {
+ background-image: linear-gradient(to bottom, white, white 50%, rgb(243, 243, 243) 50%, rgb(243, 243, 243));
+ background-size: 100% 40px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,217 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.NetworkGridContentView = function(representedObject, extraArguments)
+{
+ console.assert(extraArguments);
+ console.assert(extraArguments.networkSidebarPanel instanceof WebInspector.NetworkSidebarPanel);
+
+ WebInspector.ContentView.call(this, representedObject);
+
+ this._networkSidebarPanel = extraArguments.networkSidebarPanel;
+ this._contentTreeOutline = this._networkSidebarPanel.contentTreeOutline;
+
+ var columns = {domain: {}, type: {}, method: {}, scheme: {}, statusCode: {}, cached: {}, size: {}, transferSize: {}, requestSent: {}, latency: {}, duration: {}};
+
+ columns.domain.title = WebInspector.UIString("Domain");
+ columns.domain.width = "10%";
+
+ columns.type.title = WebInspector.UIString("Type");
+ columns.type.width = "8%";
+
+ columns.method.title = WebInspector.UIString("Method");
+ columns.method.width = "6%";
+
+ columns.scheme.title = WebInspector.UIString("Scheme");
+ columns.scheme.width = "6%";
+
+ columns.statusCode.title = WebInspector.UIString("Status");
+ columns.statusCode.width = "6%";
+
+ columns.cached.title = WebInspector.UIString("Cached");
+ columns.cached.width = "6%";
+
+ columns.size.title = WebInspector.UIString("Size");
+ columns.size.width = "8%";
+ columns.size.aligned = "right";
+
+ columns.transferSize.title = WebInspector.UIString("Transfered");
+ columns.transferSize.width = "8%";
+ columns.transferSize.aligned = "right";
+
+ columns.requestSent.title = WebInspector.UIString("Start Time");
+ columns.requestSent.width = "9%";
+ columns.requestSent.aligned = "right";
+
+ columns.latency.title = WebInspector.UIString("Latency");
+ columns.latency.width = "9%";
+ columns.latency.aligned = "right";
+
+ columns.duration.title = WebInspector.UIString("Duration");
+ columns.duration.width = "9%";
+ columns.duration.aligned = "right";
+
+ for (var column in columns)
+ columns[column].sortable = true;
+
+ this._dataGrid = new WebInspector.TimelineDataGrid(this._contentTreeOutline, columns);
+ this._dataGrid.addEventListener(WebInspector.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this);
+ this._dataGrid.sortColumnIdentifier = "requestSent";
+ this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
+
+ this.element.classList.add("network-grid");
+ this.element.appendChild(this._dataGrid.element);
+
+ var networkTimeline = WebInspector.timelineManager.persistentNetworkTimeline;
+ networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
+ networkTimeline.addEventListener(WebInspector.Timeline.Event.Reset, this._networkTimelineReset, this);
+
+ this._pendingRecords = [];
+};
+
+WebInspector.NetworkGridContentView.prototype = {
+ constructor: WebInspector.NetworkGridContentView,
+ __proto__: WebInspector.ContentView.prototype,
+
+ // Public
+
+ get navigationSidebarTreeOutline()
+ {
+ return this._contentTreeOutline;
+ },
+
+ get selectionPathComponents()
+ {
+ if (!this._contentTreeOutline.selectedTreeElement || this._contentTreeOutline.selectedTreeElement.hidden)
+ return null;
+
+ var pathComponent = new WebInspector.GeneralTreeElementPathComponent(this._contentTreeOutline.selectedTreeElement);
+ pathComponent.addEventListener(WebInspector.HierarchicalPathComponent.Event.SiblingWasSelected, this._treeElementPathComponentSelected, this);
+ return [pathComponent];
+ },
+
+ get zeroTime()
+ {
+ return WebInspector.timelineManager.persistentNetworkTimeline.startTime;
+ },
+
+ shown: function()
+ {
+ WebInspector.ContentView.prototype.shown.call(this);
+
+ this._dataGrid.shown();
+ },
+
+ hidden: function()
+ {
+ this._dataGrid.hidden();
+
+ WebInspector.ContentView.prototype.hidden.call(this);
+ },
+
+ closed: function()
+ {
+ this._dataGrid.closed();
+ },
+
+ updateLayout: function()
+ {
+ if (this._scheduledLayoutUpdateIdentifier) {
+ cancelAnimationFrame(this._scheduledLayoutUpdateIdentifier);
+ delete this._scheduledLayoutUpdateIdentifier;
+ }
+
+ this._dataGrid.updateLayout();
+
+ this._processPendingRecords();
+ },
+
+ needsLayout: function()
+ {
+ if (!this._networkSidebarPanel.visible)
+ return;
+
+ if (this._scheduledLayoutUpdateIdentifier)
+ return;
+
+ this._scheduledLayoutUpdateIdentifier = requestAnimationFrame(this.updateLayout.bind(this));
+ },
+
+ reset: function()
+ {
+ this._contentTreeOutline.removeChildren();
+ this._dataGrid.reset();
+ },
+
+ // Private
+
+ _processPendingRecords: function()
+ {
+ if (!this._pendingRecords.length)
+ return;
+
+ for (var resourceTimelineRecord of this._pendingRecords) {
+ // Skip the record if it already exists in the tree.
+ var treeElement = this._contentTreeOutline.findTreeElement(resourceTimelineRecord.resource);
+ if (treeElement)
+ continue;
+
+ treeElement = new WebInspector.ResourceTreeElement(resourceTimelineRecord.resource);
+ var dataGridNode = new WebInspector.ResourceTimelineDataGridNode(resourceTimelineRecord, false, this);
+
+ this._dataGrid.addRowInSortOrder(treeElement, dataGridNode);
+ }
+
+ this._pendingRecords = [];
+ },
+
+ _networkTimelineReset: function(event)
+ {
+ this.reset();
+ },
+
+ _networkTimelineRecordAdded: function(event)
+ {
+ var resourceTimelineRecord = event.data.record;
+ console.assert(resourceTimelineRecord instanceof WebInspector.ResourceTimelineRecord);
+
+ this._pendingRecords.push(resourceTimelineRecord);
+
+ this.needsLayout();
+ },
+
+ _treeElementPathComponentSelected: function(event)
+ {
+ var dataGridNode = this._dataGrid.dataGridNodeForTreeElement(event.data.pathComponent.generalTreeElement);
+ if (!dataGridNode)
+ return;
+ dataGridNode.revealAndSelect();
+ },
+
+ _dataGridNodeSelected: function(event)
+ {
+ this.dispatchEventToListeners(WebInspector.ContentView.Event.SelectionPathComponentsDidChange);
+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPanelcss"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder) {
+ top: 52px;
+}
+
+.sidebar > .panel.navigation.network > .navigation-bar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+}
+
+.sidebar > .panel.navigation.network > .title-bar {
+ position: absolute;
+ top: 29px;
+ left: 0;
+ right: 0;
+
+ height: 23px;
+
+ border-bottom: 1px solid rgb(179, 179, 179);
+ background-color: rgb(242, 242, 242);
+ color: rgb(57, 57, 57);
+
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-weight: bold;
+
+ padding: 4px 9px;
+
+ white-space: nowrap;
+ overflow: hidden;
+}
+
+body.window-inactive .sidebar > .panel.navigation.network > .title-bar {
+ border-bottom-color: rgb(219, 219, 219);
+}
+
+.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content {
+ /* This hides the scrollbar. The view shows a scrollbar, we don't need two. */
+ padding-right: 16px;
+ right: -16px;
+}
+
+.sidebar > .panel.navigation.network .item:not(:hover, .selected) .status .status-button,
+.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button {
+ display: none;
+}
+
+.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button {
+ display: none;
+}
+
+.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button {
+ display: none;
+}
+
+.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle {
+ display: none;
+}
+
+.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline {
+ min-height: 100%;
+ background-image: none;
+}
+
+.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline {
+ background-image: linear-gradient(to bottom, transparent, transparent 50%, rgba(0, 0, 0, 0.03) 50%, rgba(0, 0, 0, 0.03));
+ background-size: 100% 40px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPaneljs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,233 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.NetworkSidebarPanel = class NetworkSidebarPanel extends WebInspector.NavigationSidebarPanel
+{
+ constructor(contentBrowser)
+ {
+ super("network", WebInspector.UIString("Network"), true);
+
+ this.contentBrowser = contentBrowser;
+
+ this.filterBar.placeholder = WebInspector.UIString("Filter Resource List");
+
+ this._navigationBar = new WebInspector.NavigationBar;
+ this.element.appendChild(this._navigationBar.element);
+
+ this._resourcesTitleBarElement = document.createElement("div");
+ this._resourcesTitleBarElement.textContent = WebInspector.UIString("Name");
+ this._resourcesTitleBarElement.classList.add("title-bar");
+ this.element.appendChild(this._resourcesTitleBarElement);
+
+ var scopeItemPrefix = "network-sidebar-";
+ var scopeBarItems = [];
+
+ scopeBarItems.push(new WebInspector.ScopeBarItem(scopeItemPrefix + "type-all", WebInspector.UIString("All Resources"), true));
+
+ for (var key in WebInspector.Resource.Type) {
+ var value = WebInspector.Resource.Type[key];
+ var scopeBarItem = new WebInspector.ScopeBarItem(scopeItemPrefix + value, WebInspector.Resource.displayNameForType(value, true));
+ scopeBarItem.__resourceType = value;
+ scopeBarItems.push(scopeBarItem);
+ }
+
+ this._scopeBar = new WebInspector.ScopeBar("network-sidebar-scope-bar", scopeBarItems, scopeBarItems[0], true);
+ this._scopeBar.addEventListener(WebInspector.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionDidChange, this);
+
+ this._navigationBar.addNavigationItem(this._scopeBar);
+
+ this.contentTreeOutline.onselect = this._treeElementSelected.bind(this);
+ this.contentTreeOutline.element.classList.add("network-grid");
+ this.contentTreeOutline.element.classList.add(WebInspector.NavigationSidebarPanel.HideDisclosureButtonsStyleClassName);
+
+ this.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
+
+ var networkTimeline = WebInspector.timelineManager.persistentNetworkTimeline;
+ networkTimeline.addEventListener(WebInspector.Timeline.Event.Reset, this._networkTimelineReset, this);
+
+ this._networkGridView = new WebInspector.NetworkGridContentView(null, {networkSidebarPanel: this});
+ }
+
+ // Public
+
+ closed()
+ {
+ super.closed();
+
+ WebInspector.frameResourceManager.removeEventListener(null, null, this);
+ }
+
+ showDefaultContentView()
+ {
+ this.contentBrowser.showContentView(this._networkGridView);
+ }
+
+ // Protected
+
+ saveStateToCookie(cookie)
+ {
+ console.assert(cookie);
+
+ cookie[WebInspector.NetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey] = this.contentBrowser.currentContentView instanceof WebInspector.NetworkGridContentView;
+
+ super.saveStateToCookie(cookie);
+ }
+
+ restoreStateFromCookie(cookie, relaxedMatchDelay)
+ {
+ console.assert(cookie);
+
+ // Don't call NavigationSidebarPanel.restoreStateFromCookie, because it tries to match based
+ // on type selected tree element. This would cause the grid to be deselected.
+ if (cookie[WebInspector.NetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey])
+ return;
+
+ super.restoreStateFromCookie(cookie, relaxedMatchDelay);
+ }
+
+ hasCustomFilters()
+ {
+ console.assert(this._scopeBar.selectedItems.length === 1);
+ var selectedScopeBarItem = this._scopeBar.selectedItems[0];
+ return selectedScopeBarItem && !selectedScopeBarItem.exclusive;
+ }
+
+ matchTreeElementAgainstCustomFilters(treeElement, flags)
+ {
+ console.assert(this._scopeBar.selectedItems.length === 1);
+ var selectedScopeBarItem = this._scopeBar.selectedItems[0];
+
+ // Show everything if there is no selection or "All Resources" is selected (the exclusive item).
+ if (!selectedScopeBarItem || selectedScopeBarItem.exclusive)
+ return true;
+
+ function match()
+ {
+ if (treeElement instanceof WebInspector.FrameTreeElement)
+ return selectedScopeBarItem.__resourceType === WebInspector.Resource.Type.Document;
+
+ console.assert(treeElement instanceof WebInspector.ResourceTreeElement, "Unknown treeElement", treeElement);
+ if (!(treeElement instanceof WebInspector.ResourceTreeElement))
+ return false;
+
+ return treeElement.resource.type === selectedScopeBarItem.__resourceType;
+ }
+
+ var matched = match();
+ if (matched)
+ flags.expandTreeElement = true;
+ return matched;
+ }
+
+ treeElementAddedOrChanged(treeElement)
+ {
+ if (treeElement.status || !treeElement.treeOutline)
+ return;
+
+ wrappedSVGDocument("Images/Close.svg", null, WebInspector.UIString("Close resource view"), function(element) {
+ var fragment = document.createDocumentFragment();
+
+ var closeButton = new WebInspector.TreeElementStatusButton(element);
+ closeButton.element.classList.add("close");
+ closeButton.addEventListener(WebInspector.TreeElementStatusButton.Event.Clicked, this._treeElementCloseButtonClicked, this);
+ fragment.appendChild(closeButton.element);
+
+ var goToButton = new WebInspector.TreeElementStatusButton(WebInspector.createGoToArrowButton());
+ goToButton.__treeElement = treeElement;
+ goToButton.addEventListener(WebInspector.TreeElementStatusButton.Event.Clicked, this._treeElementGoToArrowWasClicked, this);
+ fragment.appendChild(goToButton.element);
+
+ treeElement.status = fragment;
+ }.bind(this));
+ }
+
+ // Private
+
+ _networkTimelineReset(event)
+ {
+ this.contentBrowser.contentViewContainer.closeAllContentViews();
+ this.showDefaultContentView();
+ }
+
+ _contentBrowserCurrentContentViewDidChange(event)
+ {
+ var didShowNetworkGridContentView = this.contentBrowser.currentContentView instanceof WebInspector.NetworkGridContentView;
+ this.element.classList.toggle("network-grid-content-view-showing", didShowNetworkGridContentView);
+ }
+
+ _treeElementGoToArrowWasClicked(event)
+ {
+ this._clickedTreeElementGoToArrow = true;
+
+ var treeElement = event.target.__treeElement;
+ console.assert(treeElement instanceof WebInspector.TreeElement);
+
+ treeElement.select(true, true);
+
+ this._clickedTreeElementGoToArrow = false;
+ }
+
+ _treeElementCloseButtonClicked(event)
+ {
+ // Say we are processing a selection change to avoid the selected tree element
+ // from being deselected when the default content view is shown.
+ this.contentTreeOutline.processingSelectionChange = true;
+
+ this.showDefaultContentView();
+
+ this.contentTreeOutline.processingSelectionChange = false;
+ }
+
+ _canShowDifferentContentView()
+ {
+ if (this._clickedTreeElementGoToArrow)
+ return true;
+
+ if (this.contentBrowser.currentContentView instanceof WebInspector.NetworkGridContentView)
+ return false;
+
+ return !this.restoringState || !this._restoredShowingNetworkGridContentView;
+ }
+
+ _treeElementSelected(treeElement, selectedByUser)
+ {
+ if (!this._canShowDifferentContentView())
+ return;
+
+ if (treeElement instanceof WebInspector.ResourceTreeElement) {
+ WebInspector.showRepresentedObject(treeElement.representedObject);
+ return;
+ }
+
+ console.error("Unknown tree element", treeElement);
+ }
+
+ _scopeBarSelectionDidChange(event)
+ {
+ this.updateFilter();
+ }
+};
+
+WebInspector.NetworkSidebarPanel.ShowingNetworkGridContentViewCookieKey = "network-sidebar-panel-showing-network-grid-content-view";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js (0 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.NetworkTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Network.svg", WebInspector.UIString("Network"));
+ var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];
+
+ WebInspector.ContentBrowserTabContentView.call(this, identifier || "network", "network", tabBarItem, WebInspector.NetworkSidebarPanel, detailsSidebarPanels);
+};
+
+WebInspector.NetworkTabContentView.prototype = {
+ constructor: WebInspector.NetworkTabContentView,
+ __proto__: WebInspector.ContentBrowserTabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.NetworkTabContentView.Type;
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ return representedObject instanceof WebInspector.Resource;
+ },
+
+ get supportsSplitContentBrowser()
+ {
+ return false;
+ }
+};
+
+WebInspector.NetworkTabContentView.Type = "network";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNewTabContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -30,14 +30,17 @@
</span><span class="cx"> WebInspector.TabContentView.call(this, identifier || "new-tab", "new-tab", tabBarItem);
</span><span class="cx">
</span><span class="cx"> var allowedNewTabs = [
</span><ins>+ {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type},
+ {image: "Images/Debugger.svg", title: WebInspector.UIString("Debugger"), type: WebInspector.DebuggerTabContentView.Type},
</ins><span class="cx"> {image: "Images/Elements.svg", title: WebInspector.UIString("Elements"), type: WebInspector.ElementsTabContentView.Type},
</span><ins>+ {image: "Images/Network.svg", title: WebInspector.UIString("Network"), type: WebInspector.NetworkTabContentView.Type},
</ins><span class="cx"> {image: "Images/Resources.svg", title: WebInspector.UIString("Resources"), type: WebInspector.ResourcesTabContentView.Type},
</span><del>- {image: "Images/Timeline.svg", title: WebInspector.UIString("Timelines"), type: WebInspector.TimelineTabContentView.Type},
- {image: "Images/Debugger.svg", title: WebInspector.UIString("Debugger"), type: WebInspector.DebuggerTabContentView.Type},
</del><span class="cx"> {image: "Images/Storage.svg", title: WebInspector.UIString("Storage"), type: WebInspector.StorageTabContentView.Type},
</span><del>- {image: "Images/Console.svg", title: WebInspector.UIString("Console"), type: WebInspector.ConsoleTabContentView.Type}
</del><ins>+ {image: "Images/Timeline.svg", title: WebInspector.UIString("Timelines"), type: WebInspector.TimelineTabContentView.Type}
</ins><span class="cx"> ];
</span><span class="cx">
</span><ins>+ allowedNewTabs.sort(function(a, b) { return a.title.localeCompare(b.title); });
+
</ins><span class="cx"> for (var info of allowedNewTabs) {
</span><span class="cx"> if (!WebInspector.isTabTypeAllowed(info.type))
</span><span class="cx"> continue;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabBarjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js (186367 => 186368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js        2015-07-06 19:44:16 UTC (rev 186367)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js        2015-07-06 19:44:23 UTC (rev 186368)
</span><span class="lines">@@ -731,7 +731,10 @@
</span><span class="cx"> this._finishExpandingTabsAfterClose();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- _handleNewTabClick(event) {
</del><ins>+ _handleNewTabClick(event)
+ {
+ if (this._newTabItem.disabled)
+ return;
</ins><span class="cx"> this.dispatchEventToListeners(WebInspector.TabBar.Event.NewTabItemClicked);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>