<!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>[183323] 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/183323">183323</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-04-25 18:16:22 -0700 (Sat, 25 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Add TabBrowser and TabContentView
https://bugs.webkit.org/show_bug.cgi?id=143886
Reviewed by Joseph Pecoraro.
* UserInterface/Images/Debugger.svg: Added.
* UserInterface/Images/Elements.svg: Added.
* UserInterface/Images/Gear.svg: Added.
* UserInterface/Images/NewTabPlus.svg: Added.
* UserInterface/Images/Resources.svg:
* UserInterface/Images/Timeline.svg: Added.
* UserInterface/Images/ToggleLeftSidebar.svg: Added.
* UserInterface/Images/ToggleRightSidebar.svg: Added.
* UserInterface/Views/ContentBrowserTabContentView.css: Added.
(.content-browser.tab.content-view > .content-browser):
* UserInterface/Views/ContentBrowserTabContentView.js: Added.
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype.get contentBrowser):
(WebInspector.ContentBrowserTabContentView.prototype.shown):
(WebInspector.ContentBrowserTabContentView.prototype.hidden):
(WebInspector.ContentBrowserTabContentView.prototype.closed):
(WebInspector.ContentBrowserTabContentView.prototype.updateLayout):
(WebInspector.ContentBrowserTabContentView.prototype.get managesDetailsSidebarPanels):
(WebInspector.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
(WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarCollapsedStateDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):
(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserRepresentedObjectsDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar):
* UserInterface/Views/DebuggerTabContentView.js: Added.
(WebInspector.DebuggerTabContentView):
* UserInterface/Views/ElementsTabContentView.js: Added.
(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.prototype._mainFrameDidChange):
* UserInterface/Views/ResourcesTabContentView.js: Added.
(WebInspector.ResourcesTabContentView):
* UserInterface/Views/SettingsTabContentView.js: Added.
(WebInspector.SettingsTabContentView):
* UserInterface/Views/TabBrowser.css: Added.
(.tab-browser):
(.tab-browser > .tab-bar):
(.tab-browser > .content-view-container):
(.tab-browser > .tab-bar + .content-view-container):
* UserInterface/Views/TabBrowser.js: Added.
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype.get tabBar):
(WebInspector.TabBrowser.prototype.get navigationSidebar):
(WebInspector.TabBrowser.prototype.get detailsSidebar):
(WebInspector.TabBrowser.prototype.get selectedTabContentView):
(WebInspector.TabBrowser.prototype.updateLayout):
(WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
(WebInspector.TabBrowser.prototype.addTabForContentView):
(WebInspector.TabBrowser.prototype.showTabForContentView):
(WebInspector.TabBrowser.prototype.closeTabForContentView):
(WebInspector.TabBrowser.prototype._tabBarItemSelected):
(WebInspector.TabBrowser.prototype._sidebarPanelSelected):
(WebInspector.TabBrowser.prototype._sidebarCollapsedStateDidChange):
(WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
(WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
* UserInterface/Views/TabContentView.js: Added.
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.get parentTabBrowser):
(WebInspector.TabContentView.prototype.set parentTabBrowser):
(WebInspector.TabContentView.prototype.get tabBarItem):
(WebInspector.TabContentView.prototype.get managesDetailsSidebarPanels):
(WebInspector.TabContentView.prototype.showDetailsSidebarPanels):
(WebInspector.TabContentView.prototype.canShowRepresentedObject):
(WebInspector.TabContentView.prototype.get navigationSidebarPanel):
(WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarPanels):
(WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
* UserInterface/Views/TimelineTabContentView.js: Added.
(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="#trunkSourceWebInspectorUIUserInterfaceImagesResourcessvg">trunk/Source/WebInspectorUI/UserInterface/Images/Resources.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss">trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentViewContainerjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesDebuggersvg">trunk/Source/WebInspectorUI/UserInterface/Images/Debugger.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesElementssvg">trunk/Source/WebInspectorUI/UserInterface/Images/Elements.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesGearsvg">trunk/Source/WebInspectorUI/UserInterface/Images/Gear.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesNewTabPlussvg">trunk/Source/WebInspectorUI/UserInterface/Images/NewTabPlus.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesTimelinesvg">trunk/Source/WebInspectorUI/UserInterface/Images/Timeline.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesToggleLeftSidebarsvg">trunk/Source/WebInspectorUI/UserInterface/Images/ToggleLeftSidebar.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesToggleRightSidebarsvg">trunk/Source/WebInspectorUI/UserInterface/Images/ToggleRightSidebar.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsElementsTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsResourcesTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsSettingsTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabBrowsercss">trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs">trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTabContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.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 (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -1,3 +1,92 @@
</span><ins>+2015-04-17 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Add TabBrowser and TabContentView
+ https://bugs.webkit.org/show_bug.cgi?id=143886
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Images/Debugger.svg: Added.
+ * UserInterface/Images/Elements.svg: Added.
+ * UserInterface/Images/Gear.svg: Added.
+ * UserInterface/Images/NewTabPlus.svg: Added.
+ * UserInterface/Images/Resources.svg:
+ * UserInterface/Images/Timeline.svg: Added.
+ * UserInterface/Images/ToggleLeftSidebar.svg: Added.
+ * UserInterface/Images/ToggleRightSidebar.svg: Added.
+
+ * UserInterface/Views/ContentBrowserTabContentView.css: Added.
+ (.content-browser.tab.content-view > .content-browser):
+
+ * UserInterface/Views/ContentBrowserTabContentView.js: Added.
+ (WebInspector.ContentBrowserTabContentView):
+ (WebInspector.ContentBrowserTabContentView.prototype.get contentBrowser):
+ (WebInspector.ContentBrowserTabContentView.prototype.shown):
+ (WebInspector.ContentBrowserTabContentView.prototype.hidden):
+ (WebInspector.ContentBrowserTabContentView.prototype.closed):
+ (WebInspector.ContentBrowserTabContentView.prototype.updateLayout):
+ (WebInspector.ContentBrowserTabContentView.prototype.get managesDetailsSidebarPanels):
+ (WebInspector.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
+ (WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
+ (WebInspector.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
+ (WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarCollapsedStateDidChange):
+ (WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):
+ (WebInspector.ContentBrowserTabContentView.prototype._contentBrowserRepresentedObjectsDidChange):
+ (WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
+ (WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar):
+
+ * UserInterface/Views/DebuggerTabContentView.js: Added.
+ (WebInspector.DebuggerTabContentView):
+
+ * UserInterface/Views/ElementsTabContentView.js: Added.
+ (WebInspector.ElementsTabContentView):
+ (WebInspector.ElementsTabContentView.prototype._mainFrameDidChange):
+
+ * UserInterface/Views/ResourcesTabContentView.js: Added.
+ (WebInspector.ResourcesTabContentView):
+
+ * UserInterface/Views/SettingsTabContentView.js: Added.
+ (WebInspector.SettingsTabContentView):
+
+ * UserInterface/Views/TabBrowser.css: Added.
+ (.tab-browser):
+ (.tab-browser > .tab-bar):
+ (.tab-browser > .content-view-container):
+ (.tab-browser > .tab-bar + .content-view-container):
+
+ * UserInterface/Views/TabBrowser.js: Added.
+ (WebInspector.TabBrowser):
+ (WebInspector.TabBrowser.prototype.get tabBar):
+ (WebInspector.TabBrowser.prototype.get navigationSidebar):
+ (WebInspector.TabBrowser.prototype.get detailsSidebar):
+ (WebInspector.TabBrowser.prototype.get selectedTabContentView):
+ (WebInspector.TabBrowser.prototype.updateLayout):
+ (WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
+ (WebInspector.TabBrowser.prototype.addTabForContentView):
+ (WebInspector.TabBrowser.prototype.showTabForContentView):
+ (WebInspector.TabBrowser.prototype.closeTabForContentView):
+ (WebInspector.TabBrowser.prototype._tabBarItemSelected):
+ (WebInspector.TabBrowser.prototype._sidebarPanelSelected):
+ (WebInspector.TabBrowser.prototype._sidebarCollapsedStateDidChange):
+ (WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
+ (WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
+
+ * UserInterface/Views/TabContentView.js: Added.
+ (WebInspector.TabContentView):
+ (WebInspector.TabContentView.prototype.get parentTabBrowser):
+ (WebInspector.TabContentView.prototype.set parentTabBrowser):
+ (WebInspector.TabContentView.prototype.get tabBarItem):
+ (WebInspector.TabContentView.prototype.get managesDetailsSidebarPanels):
+ (WebInspector.TabContentView.prototype.showDetailsSidebarPanels):
+ (WebInspector.TabContentView.prototype.canShowRepresentedObject):
+ (WebInspector.TabContentView.prototype.get navigationSidebarPanel):
+ (WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
+ (WebInspector.TabContentView.prototype.get detailsSidebarPanels):
+ (WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
+ (WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
+
+ * UserInterface/Views/TimelineTabContentView.js: Added.
+ (WebInspector.TimelineTabContentView):
+
</ins><span class="cx"> 2015-04-06 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Add a WebInspector.TabBar class
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -240,6 +240,12 @@
</span><span class="cx"> this.detailsSidebar.addEventListener(WebInspector.Sidebar.Event.WidthDidChange, this._sidebarWidthDidChange, this);
</span><span class="cx"> this.detailsSidebar.addEventListener(WebInspector.Sidebar.Event.SidebarPanelSelected, this._detailsSidebarPanelSelected, this);
</span><span class="cx">
</span><ins>+ this.navigationSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "0", this.toggleNavigationSidebar.bind(this));
+ this.detailsSidebarKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Option, "0", this.toggleDetailsSidebar.bind(this));
+
+ this.tabBrowser = new WebInspector.TabBrowser(document.getElementById("tab-browser"), this.tabBar, this.navigationSidebar, this.detailsSidebar);
+ this.tabBrowser.addEventListener(WebInspector.TabBrowser.Event.SelectedTabContentViewDidChange, this._tabBrowserSelectedTabContentViewDidChange, this);
+
</ins><span class="cx"> this._reloadPageKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "R", this._reloadPage.bind(this));
</span><span class="cx"> this._reloadPageIgnoringCacheKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, "R", this._reloadPageIgnoringCache.bind(this));
</span><span class="cx">
</span><span class="lines">@@ -691,6 +697,30 @@
</span><span class="cx"> this.previousFocusElement.focus();
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+WebInspector.toggleNavigationSidebar = function(event)
+{
+ if (!this.navigationSidebar.collapsed || !this.navigationSidebar.sidebarPanels.length) {
+ this.navigationSidebar.collapsed = true;
+ return;
+ }
+
+ if (!this.navigationSidebar.selectedSidebarPanel)
+ this.navigationSidebar.selectedSidebarPanel = this.navigationSidebar.sidebarPanels[0];
+ this.navigationSidebar.collapsed = false;
+};
+
+WebInspector.toggleDetailsSidebar = function(event)
+{
+ if (!this.detailsSidebar.collapsed || !this.detailsSidebar.sidebarPanels.length) {
+ this.detailsSidebar.collapsed = true;
+ return;
+ }
+
+ if (!this.detailsSidebar.selectedSidebarPanel)
+ this.detailsSidebar.selectedSidebarPanel = this.detailsSidebar.sidebarPanels[0];
+ this.detailsSidebar.collapsed = false;
+};
+
</ins><span class="cx"> WebInspector._focusChanged = function(event)
</span><span class="cx"> {
</span><span class="cx"> // Make a caret selection inside the focused element if there isn't a range selection and there isn't already
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesDebuggersvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Debugger.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Debugger.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Debugger.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,13 @@
</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">
+ <path d="M 8.04545455 15 C 10.8068784 15 13.0454545 11.8659934 13.0454545 8 C 13.0454545 4.13400656 10.8068784 1 8.04545455 1 C 5.28403066 1 3.04545455 4.13400656 3.04545455 8 C 3.04545455 11.8659934 5.28403066 15 8.04545455 15 Z" class="stroked" fill="none" stroke="black"/>
+ <path d="M 3.5 4.5 L 12.5 4.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 8 4.5 L 8 15" class="stroked" fill="none" stroke="black"/>
+ <path d="M 11.5 12.5 L 13.5 14.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 13 8 L 15 8" class="stroked" fill="none" stroke="black"/>
+ <path d="M 3 8 L 1 8" class="stroked" fill="none" stroke="black"/>
+ <path d="M 4.5 12.5 L 2.5 14.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 4.5 3.5 L 2.5 1.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 11.5 3.5 L 13.5 1.5" class="stroked" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesElementssvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Elements.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Elements.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Elements.svg        2015-04-26 01:16:22 UTC (rev 183323)
</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">
+ <rect x="1.5" y="1.5" width="13" height="5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 11.5 6.5 L 11.5 10.5" class="stroked" fill="none" stroke="black"/>
+ <path d="M 4.5 6.5 L 4.5 10.5" class="stroked" fill="none" stroke="black"/>
+ <rect x="9.5" y="10.5" width="5" height="4" class="stroked" fill="none" stroke="black"/>
+ <rect x="1.5" y="10.5" width="5" height="4" class="stroked" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesGearsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Gear.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Gear.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Gear.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 7.5009 14 C 8.3259 14 9.0009 13.325 9.0019 12.5 L 9.0009 11.725 C 9.1479 11.673 9.2909 11.616 9.4299 11.551 L 10.1759 12.298 C 10.7599 12.881 11.7149 12.88 12.2969 12.297 C 12.5899 12.005 12.7349 11.619 12.7349 11.235 C 12.7349 10.852 12.5899 10.467 12.2979 10.175 L 11.5519 9.429 C 11.6179 9.289 11.6739 9.146 11.7259 9 L 12.5009 8.999 C 13.3259 9 14.0009 8.325 14.0009 7.5 C 14.0009 6.674 13.3259 6 12.5009 5.999 L 11.7259 6 C 11.6739 5.853 11.6179 5.71 11.5519 5.571 L 12.2979 4.825 C 12.5889 4.533 12.7349 4.148 12.7349 3.764 C 12.7349 3.379 12.5899 2.995 12.2989 2.704 C 11.7149 2.119 10.7599 2.119 10.1769 2.702 L 9.4299 3.449 C 9.2899 3.382 9.1479 3.327 9.0009 3.275 L 9.0009 2.499 C 9.0009 1.674 8.3259 0.999 7.5009 0.999 C 6.6759 0.999 6.0009 1.674 6.0009 2.499 L 6.0009 3.275 C 5.8549 3.327 5.7109 3.383 5.5709 3.449 L 4.8249 2.703 C 4.2419 2.12 3.2869 2.12 2.7039 2.703 C 2.4119 2.995 2.2659 3.379 2.2659 3.763 C 2.2659 4.148 2.4119 4.532 2.7029 4.824 L 3
.4499 5.571 C 3.3839 5.71 3.3289 5.853 3.2759 6 L 2.5009 5.999 C 1.6759 6 1.0009 6.674 1.0009 7.5 C 1.0009 8.325 1.6759 9 2.5009 9 L 3.2759 9 C 3.3279 9.146 3.3839 9.289 3.4499 9.429 L 2.7039 10.175 C 2.4119 10.467 2.2649 10.852 2.2659 11.236 C 2.2649 11.621 2.4129 12.006 2.7029 12.296 C 3.2869 12.88 4.2419 12.88 4.8249 12.297 L 5.5719 11.551 C 5.7109 11.616 5.8539 11.673 6.0009 11.725 L 5.9999 12.5 C 6.0009 13.325 6.6759 14 7.5009 14 Z" class="stroked" fill="none" stroke="black"/>
+ <path d="M 7.5 5.6 C 8.548 5.6 9.4 6.452 9.4 7.5 C 9.4 8.548 8.548 9.4 7.5 9.4 C 6.452 9.4 5.6 8.548 5.6 7.5 C 5.6 6.452 6.452 5.6 7.5 5.6" class="stroked" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesNewTabPlussvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/NewTabPlus.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/NewTabPlus.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/NewTabPlus.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,5 @@
</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">
+ <path d="M 8 2 L 8 13 M 2.5 7.5 L 13.5 7.5" class="stroked" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesResourcessvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/Resources.svg (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Resources.svg        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Resources.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> <?xml version="1.0" encoding="utf-8"?>
</span><del>-<!-- Copyright © 2014 Apple Inc. All rights reserved. -->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
- <path fill="none" stroke="black" d="M 3.5 2.5 L 3.5 13.5 L 12.5 13.5 L 12.5 5.5 L 9.5 2.5 L 3.5 2.5 Z "/>
- <path d="M 9 4 L 9 6 L 11 6 L 9 4 Z "/>
</del><ins>+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 2.5 1.5 L 2.5 14.5 L 13.5 14.5 L 13.5 5.5 L 9.5 1.5 L 2.5 1.5 Z" class="stroked" fill="none" stroke="black"/>
+ <path d="M 9.0 3.0 L 9.0 6.0 L 12.0 6.0 Z" class="filled" fill="black"/>
</ins><span class="cx"> </svg>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesTimelinesvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/Timeline.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Timeline.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Timeline.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,6 @@
</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 8.5 3 L 8.5 8.5 L 5 8.5" class="stroked" fill="none" stroke="black"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesToggleLeftSidebarsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/ToggleLeftSidebar.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/ToggleLeftSidebar.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/ToggleLeftSidebar.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,6 @@
</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">
+ <rect class="stroked" stroke="black" fill="none" x="2.5" y="1.5" width="11" height="13"/>
+ <rect class="filled" fill="black" x="4" y="3" width="2" height="10"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesToggleRightSidebarsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/ToggleRightSidebar.svg (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/ToggleRightSidebar.svg         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/ToggleRightSidebar.svg        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,6 @@
</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">
+ <rect class="stroked" stroke="black" fill="none" x="2.5" y="1.5" width="11" height="13"/>
+ <rect class="filled" fill="black" x="10" y="3" width="2" height="10"/>
+</svg>
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">
</span><span class="cx"> .CodeMirror .CodeMirror-linenumber {
</span><span class="cx"> padding: 0 2px;
</span><del>- min-width: 21px;
</del><ins>+ min-width: 22px;
</ins><span class="cx">
</span><span class="cx"> color: rgb(146, 146, 146);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -78,7 +78,8 @@
</span><span class="cx">
</span><span class="cx"> this._contentViewSelectionPathNavigationItem = new WebInspector.HierarchicalPathNavigationItem;
</span><span class="cx">
</span><del>- this._navigationBar.addNavigationItem(new WebInspector.FlexibleSpaceNavigationItem);
</del><ins>+ this._dividingFlexibleSpaceNavigationItem = new WebInspector.FlexibleSpaceNavigationItem;
+ this._navigationBar.addNavigationItem(this._dividingFlexibleSpaceNavigationItem);
</ins><span class="cx">
</span><span class="cx"> WebInspector.ContentView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._contentViewSelectionPathComponentDidChange, this);
</span><span class="cx"> WebInspector.ContentView.addEventListener(WebInspector.ContentView.Event.SupplementalRepresentedObjectsDidChange, this._contentViewSupplementalRepresentedObjectsDidChange, this);
</span><span class="lines">@@ -415,7 +416,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var insertionIndex = navigationBar.navigationItems.length;
</del><ins>+ var insertionIndex = navigationBar.navigationItems.indexOf(this._dividingFlexibleSpaceNavigationItem) + 1;
</ins><span class="cx"> console.assert(insertionIndex >= 0);
</span><span class="cx">
</span><span class="cx"> // Keep track of items we'll be adding to the navigation bar.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewcssfromrev183322trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.css (from rev 183322, trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css) (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.css         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.css        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,32 @@
</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-browser.tab.content-view > .content-browser {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentBrowserTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,254 @@
</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.ContentBrowserTabContentView = function(identifier, styleClassNames, tabBarItem, navigationSidebarPanelClass, detailsSidebarPanels, disableBackForward)
+{
+ if (typeof styleClassNames === "string")
+ styleClassNames = [styleClassNames];
+
+ styleClassNames.push("content-browser");
+
+ var contentBrowser = new WebInspector.ContentBrowser(null, this, disableBackForward);
+ var navigationSidebarPanel = navigationSidebarPanelClass ? new navigationSidebarPanelClass(contentBrowser) : null;
+
+ WebInspector.TabContentView.call(this, identifier, styleClassNames, tabBarItem, navigationSidebarPanel, detailsSidebarPanels);
+
+ this._lastSelectedDetailsSidebarPanelSetting = new WebInspector.Setting(identifier + "-last-selected-details-sidebar-panel", null);
+
+ this._contentBrowser = contentBrowser;
+ this._contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentRepresentedObjectsDidChange, this._contentBrowserRepresentedObjectsDidChange, this);
+ this._contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
+
+ if (navigationSidebarPanel) {
+ var showToolTip = WebInspector.UIString("Show the navigation sidebar (%s)").format(WebInspector.navigationSidebarKeyboardShortcut.displayName);
+ var hideToolTip = WebInspector.UIString("Hide the navigation sidebar (%s)").format(WebInspector.navigationSidebarKeyboardShortcut.displayName);
+
+ this._showNavigationSidebarItem = new WebInspector.ActivateButtonNavigationItem("toggle-navigation-sidebar", showToolTip, hideToolTip, "Images/ToggleLeftSidebar.svg", 16, 16);
+ this._showNavigationSidebarItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, WebInspector.toggleNavigationSidebar, WebInspector);
+ this._showNavigationSidebarItem.activated = !WebInspector.navigationSidebar.collapsed;
+
+ this._contentBrowser.navigationBar.insertNavigationItem(this._showNavigationSidebarItem, 0);
+ this._contentBrowser.navigationBar.insertNavigationItem(new WebInspector.DividerNavigationItem, 1);
+
+ navigationSidebarPanel.contentBrowser = this._contentBrowser;
+
+ WebInspector.navigationSidebar.addEventListener(WebInspector.Sidebar.Event.CollapsedStateDidChange, this._navigationSidebarCollapsedStateDidChange, this);
+ }
+
+ if (detailsSidebarPanels && detailsSidebarPanels.length) {
+ var showToolTip = WebInspector.UIString("Show the details sidebar (%s)").format(WebInspector.detailsSidebarKeyboardShortcut.displayName);
+ var hideToolTip = WebInspector.UIString("Hide the details sidebar (%s)").format(WebInspector.detailsSidebarKeyboardShortcut.displayName);
+
+ this._showDetailsSidebarItem = new WebInspector.ActivateButtonNavigationItem("toggle-details-sidebar", showToolTip, hideToolTip, "Images/ToggleRightSidebar.svg", 16, 16);
+ this._showDetailsSidebarItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, WebInspector.toggleDetailsSidebar, WebInspector);
+ this._showDetailsSidebarItem.activated = !WebInspector.detailsSidebar.collapsed;
+ this._showDetailsSidebarItem.enabled = false;
+
+ this._contentBrowser.navigationBar.addNavigationItem(new WebInspector.DividerNavigationItem);
+ this._contentBrowser.navigationBar.addNavigationItem(this._showDetailsSidebarItem);
+
+ WebInspector.detailsSidebar.addEventListener(WebInspector.Sidebar.Event.CollapsedStateDidChange, this._detailsSidebarCollapsedStateDidChange, this);
+ WebInspector.detailsSidebar.addEventListener(WebInspector.Sidebar.Event.SidebarPanelSelected, this._detailsSidebarPanelSelected, this);
+ }
+
+ this.element.appendChild(this._contentBrowser.element);
+};
+
+WebInspector.ContentBrowserTabContentView.prototype = {
+ constructor: WebInspector.ContentBrowserTabContentView,
+ __proto__: WebInspector.TabContentView.prototype,
+
+ // Public
+
+ get contentBrowser()
+ {
+ return this._contentBrowser;
+ },
+
+ shown: function()
+ {
+ WebInspector.TabContentView.prototype.shown.call(this);
+
+ if (this.navigationSidebarPanel && !this._contentBrowser.currentContentView)
+ this.navigationSidebarPanel.showDefaultContentView();
+ },
+
+ closed: function()
+ {
+ WebInspector.TabContentView.prototype.closed.call(this);
+
+ WebInspector.navigationSidebar.removeEventListener(null, null, this);
+ WebInspector.detailsSidebar.removeEventListener(null, null, this);
+
+ this._contentBrowser.contentViewContainer.closeAllContentViews();
+ },
+
+ updateLayout: function()
+ {
+ WebInspector.TabContentView.prototype.updateLayout.call(this);
+
+ this._contentBrowser.updateLayout();
+ },
+
+ get managesDetailsSidebarPanels()
+ {
+ return true;
+ },
+
+ showDetailsSidebarPanels: function()
+ {
+ this._contentBrowserRepresentedObjectsDidChange();
+ },
+
+ showRepresentedObject: function(representedObject, cookie)
+ {
+ this.contentBrowser.showContentViewForRepresentedObject(representedObject, cookie);
+ },
+
+ // ContentBrowser Delegate
+
+ contentBrowserTreeElementForRepresentedObject: function(contentBrowser, representedObject)
+ {
+ if (this.navigationSidebarPanel)
+ return this.navigationSidebarPanel.treeElementForRepresentedObject(representedObject);
+ return null;
+ },
+
+ // Private
+
+ _navigationSidebarCollapsedStateDidChange: function(event)
+ {
+ this._showNavigationSidebarItem.activated = !WebInspector.navigationSidebar.collapsed;
+ },
+
+ _detailsSidebarCollapsedStateDidChange: function(event)
+ {
+ if (!this.visible)
+ return;
+
+ this._showDetailsSidebarItem.activated = !WebInspector.detailsSidebar.collapsed;
+ this._showDetailsSidebarItem.enabled = WebInspector.detailsSidebar.sidebarPanels.length;
+
+ if (this._ignoreDetailsSidebarPanelCollapsedEvent)
+ return;
+
+ this.detailsSidebarCollapsedSetting.value = WebInspector.detailsSidebar.collapsed;
+ },
+
+ _detailsSidebarPanelSelected: function(event)
+ {
+ if (!this.visible)
+ return;
+
+ this._showDetailsSidebarItem.enabled = WebInspector.detailsSidebar.sidebarPanels.length;
+
+ if (!WebInspector.detailsSidebar.selectedSidebarPanel || this._ignoreDetailsSidebarPanelSelectedEvent)
+ return;
+
+ this._lastSelectedDetailsSidebarPanelSetting.value = WebInspector.detailsSidebar.selectedSidebarPanel.identifier;
+ },
+
+ _contentBrowserRepresentedObjectsDidChange: function()
+ {
+ if (!this.visible)
+ return;
+
+ var currentRepresentedObjects = this._contentBrowser.currentRepresentedObjects;
+ var currentSidebarPanels = WebInspector.detailsSidebar.sidebarPanels;
+ var wasSidebarEmpty = !currentSidebarPanels.length;
+
+ // Ignore any changes to the selected sidebar panel during this function so only user initiated
+ // changes are recorded in _lastSelectedDetailsSidebarPanelSetting.
+ this._ignoreDetailsSidebarPanelSelectedEvent = true;
+ this._ignoreDetailsSidebarPanelCollapsedEvent = true;
+
+ for (var i = 0; i < this.detailsSidebarPanels.length; ++i) {
+ var sidebarPanel = this.detailsSidebarPanels[i];
+ if (sidebarPanel.inspect(currentRepresentedObjects)) {
+ if (currentSidebarPanels.includes(sidebarPanel)) {
+ // Already showing the panel.
+ continue;
+ }
+
+ // The sidebar panel was not previously showing, so add the panel.
+ WebInspector.detailsSidebar.addSidebarPanel(sidebarPanel);
+
+ if (this._lastSelectedDetailsSidebarPanelSetting.value === sidebarPanel.identifier) {
+ // Restore the sidebar panel selection if this sidebar panel was the last one selected by the user.
+ WebInspector.detailsSidebar.selectedSidebarPanel = sidebarPanel;
+ }
+ } else {
+ // The sidebar panel can't inspect the current represented objects, so remove the panel and hide the toolbar item.
+ WebInspector.detailsSidebar.removeSidebarPanel(sidebarPanel);
+ }
+ }
+
+ if (!WebInspector.detailsSidebar.selectedSidebarPanel && currentSidebarPanels.length)
+ WebInspector.detailsSidebar.selectedSidebarPanel = currentSidebarPanels[0];
+
+ if (!WebInspector.detailsSidebar.sidebarPanels.length)
+ WebInspector.detailsSidebar.collapsed = true;
+ else if (wasSidebarEmpty)
+ WebInspector.detailsSidebar.collapsed = this.detailsSidebarCollapsedSetting.value;
+
+ this._ignoreDetailsSidebarPanelCollapsedEvent = false;
+ this._ignoreDetailsSidebarPanelSelectedEvent = false;
+
+ if (!this.detailsSidebarPanels.length)
+ return;
+
+ this._showDetailsSidebarItem.enabled = WebInspector.detailsSidebar.sidebarPanels.length;
+ },
+
+ _contentBrowserCurrentContentViewDidChange: function(event)
+ {
+ var currentContentView = this._contentBrowser.currentContentView;
+ if (!currentContentView)
+ return;
+
+ this._revealAndSelectRepresentedObjectInNavigationSidebar(currentContentView.representedObject);
+ },
+
+ _revealAndSelectRepresentedObjectInNavigationSidebar: function(representedObject)
+ {
+ if (!this.navigationSidebarPanel)
+ return;
+
+ // If a tree outline is processing a selection currently then we can assume the selection does not
+ // need to be changed. This is needed to allow breakpoint and call frame tree elements to be selected
+ // without jumping back to selecting the resource tree element.
+ for (var contentTreeOutline of this.navigationSidebarPanel.visibleContentTreeOutlines) {
+ if (contentTreeOutline.processingSelectionChange)
+ return;
+ }
+
+ var treeElement = this.navigationSidebarPanel.treeElementForRepresentedObject(representedObject);
+
+ if (treeElement)
+ treeElement.revealAndSelect(true, false, false, true);
+ else if (this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement)
+ this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement.deselect(true);
+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">
</span><span class="cx"> // Concrete object instantiation.
</span><span class="cx"> console.assert(this.constructor !== WebInspector.ContentView && this instanceof WebInspector.ContentView);
</span><del>- console.assert(WebInspector.ContentView.isViewable(representedObject));
</del><ins>+ console.assert(!representedObject || WebInspector.ContentView.isViewable(representedObject));
</ins><span class="cx">
</span><span class="cx"> // FIXME: Convert this to a WebInspector.Object subclass, and call super().
</span><span class="cx"> // WebInspector.Object.call(this);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsContentViewContainerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js (183322 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js        2015-04-26 01:15:03 UTC (rev 183322)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -308,6 +308,62 @@
</span><span class="cx"> }
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ closeContentView: function(contentViewToClose)
+ {
+ if (!this._backForwardList.length) {
+ console.assert(this._currentIndex === -1);
+ return;
+ }
+
+ // Do a check to see if all the content views are instances of this prototype.
+ // If they all are we can use the quicker closeAllContentViews method.
+ var allSameContentView = true;
+ for (var i = this._backForwardList.length - 1; i >= 0; --i) {
+ if (this._backForwardList[i].contentView !== contentViewToClose) {
+ allSameContentView = false;
+ break;
+ }
+ }
+
+ if (allSameContentView) {
+ this.closeAllContentViews();
+ return;
+ }
+
+ var oldCurrentContentView = this.currentContentView;
+
+ var backForwardListDidChange = false;
+ // Hide and disassociate with all the content views that are the same as contentViewToClose.
+ for (var i = this._backForwardList.length - 1; i >= 0; --i) {
+ var entry = this._backForwardList[i];
+ if (entry.contentView !== contentViewToClose)
+ continue;
+
+ if (entry.contentView === oldCurrentContentView)
+ this._hideEntry(entry);
+
+ if (this._currentIndex >= i) {
+ // Decrement the currentIndex since we will remove an item in the back/forward array
+ // that it the current index or comes before it.
+ --this._currentIndex;
+ }
+
+ this._disassociateFromContentView(entry.contentView);
+
+ // Remove the item from the back/forward list.
+ this._backForwardList.splice(i, 1);
+ backForwardListDidChange = true;
+ }
+
+ var currentEntry = this.currentBackForwardEntry;
+ console.assert(currentEntry || (!currentEntry && this._currentIndex === -1));
+
+ if (currentEntry && currentEntry.contentView !== oldCurrentContentView || backForwardListDidChange) {
+ this._showEntry(currentEntry, true);
+ this.dispatchEventToListeners(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange);
+ }
+ },
+
</ins><span class="cx"> closeAllContentViews: function()
</span><span class="cx"> {
</span><span class="cx"> if (!this._backForwardList.length) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerTabContentView.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,60 @@
</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.DebuggerTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Debugger.svg", WebInspector.UIString("Debugger"));
+ var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.scopeChainDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];
+
+ // FIME: Until DebuggerSidebarPanel supports instantiating after inspector launch, disable closing.
+ tabBarItem.hideCloseButton = true;
+
+ WebInspector.ContentBrowserTabContentView.call(this, identifier || "debugger", "debugger", tabBarItem, WebInspector.DebuggerSidebarPanel, detailsSidebarPanels);
+};
+
+WebInspector.DebuggerTabContentView.prototype = {
+ constructor: WebInspector.DebuggerTabContentView,
+ __proto__: WebInspector.ContentBrowserTabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.DebuggerTabContentView.Type;
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ if (representedObject instanceof WebInspector.Script)
+ return true;
+
+ if (!(representedObject instanceof WebInspector.Resource))
+ return false;
+
+ return representedObject.type === WebInspector.Resource.Type.Document || representedObject.type === WebInspector.Resource.Type.Script;
+ }
+};
+
+WebInspector.DebuggerTabContentView.Type = "debugger";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsElementsTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</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.
+ */
+
+WebInspector.ElementsTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Elements.svg", WebInspector.UIString("Elements"));
+ var detailsSidebarPanels = [WebInspector.domNodeDetailsSidebarPanel, WebInspector.cssStyleDetailsSidebarPanel];
+
+ if (WebInspector.layerTreeDetailsSidebarPanel)
+ detailsSidebarPanels.push(WebInspector.layerTreeDetailsSidebarPanel);
+
+ WebInspector.ContentBrowserTabContentView.call(this, identifier || "elements", "elements", tabBarItem, null, detailsSidebarPanels, true);
+
+ WebInspector.frameResourceManager.addEventListener(WebInspector.FrameResourceManager.Event.MainFrameDidChange, this._mainFrameDidChange, this);
+
+ if (WebInspector.frameResourceManager.mainFrame)
+ this.contentBrowser.showContentViewForRepresentedObject(WebInspector.frameResourceManager.mainFrame.domTree);
+};
+
+WebInspector.ElementsTabContentView.prototype = {
+ constructor: WebInspector.ElementsTabContentView,
+ __proto__: WebInspector.ContentBrowserTabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.ElementsTabContentView.Type;
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ return representedObject instanceof WebInspector.DOMTree;
+ },
+
+ showRepresentedObject: function(representedObject, cookie)
+ {
+ var domTreeContentView = this.contentBrowser.currentContentView;
+ console.assert(!domTreeContentView || domTreeContentView instanceof WebInspector.DOMTreeContentView);
+ if (!domTreeContentView || !(domTreeContentView instanceof WebInspector.DOMTreeContentView)) {
+ // FIXME: Remember inspected node for later when _mainFrameDidChange.
+ return;
+ }
+
+ if (!cookie || !cookie.nodeToSelect)
+ return;
+
+ domTreeContentView.selectAndRevealDOMNode(cookie.nodeToSelect);
+
+ // Because nodeToSelect is ephemeral, we don't want to keep
+ // it around in the back-forward history entries.
+ cookie.nodeToSelect = undefined;
+ },
+
+ closed: function()
+ {
+ WebInspector.ContentBrowserTabContentView.prototype.closed.call(this);
+
+ WebInspector.removeResourceManager.addEventListener(null, null, this);
+ },
+
+ // Private
+
+ _mainFrameDidChange: function(event)
+ {
+ this.contentBrowser.contentViewContainer.closeAllContentViews();
+
+ var mainFrame = WebInspector.frameResourceManager.mainFrame;
+ if (mainFrame)
+ this.contentBrowser.showContentViewForRepresentedObject(mainFrame.domTree);
+ }
+};
+
+WebInspector.ElementsTabContentView.Type = "elements";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsResourcesTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,64 @@
</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.ResourcesTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Resources.svg", WebInspector.UIString("Resources"));
+ var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.applicationCacheDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel];
+
+ // FIXME: Until ContentFlows are moved to the Elements tab, these details sidebar panels need to be included.
+ detailsSidebarPanels = detailsSidebarPanels.concat([WebInspector.domNodeDetailsSidebarPanel, WebInspector.cssStyleDetailsSidebarPanel]);
+ if (WebInspector.layerTreeDetailsSidebarPanel)
+ detailsSidebarPanels.push(WebInspector.layerTreeDetailsSidebarPanel);
+
+ // FIME: Until ResourceSidebarPanel supports instantiating after inspector launch, disable closing.
+ tabBarItem.hideCloseButton = true;
+
+ WebInspector.ContentBrowserTabContentView.call(this, identifier || "resources", "resources", tabBarItem, WebInspector.ResourceSidebarPanel, detailsSidebarPanels);
+};
+
+WebInspector.ResourcesTabContentView.prototype = {
+ constructor: WebInspector.ResourcesTabContentView,
+ __proto__: WebInspector.ContentBrowserTabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.ResourcesTabContentView.Type;
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ return representedObject instanceof WebInspector.Frame || representedObject instanceof WebInspector.Resource ||
+ representedObject instanceof WebInspector.Script || representedObject instanceof WebInspector.ContentFlow ||
+ representedObject instanceof WebInspector.DOMStorageObject || representedObject instanceof WebInspector.CookieStorageObject ||
+ representedObject instanceof WebInspector.DatabaseTableObject || representedObject instanceof WebInspector.DatabaseObject ||
+ representedObject instanceof WebInspector.ApplicationCacheFrame || representedObject instanceof WebInspector.IndexedDatabaseObjectStore ||
+ representedObject instanceof WebInspector.IndexedDatabaseObjectStoreIndex;
+ }
+};
+
+WebInspector.ResourcesTabContentView.Type = "resources";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsSettingsTabContentViewjsfromrev183322trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (from rev 183322, trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css) (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,45 @@
</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.SettingsTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Gear.svg", WebInspector.UIString("Settings"), true);
+
+ WebInspector.TabContentView.call(this, identifier || "settings", "settings", tabBarItem);
+};
+
+WebInspector.SettingsTabContentView.prototype = {
+ constructor: WebInspector.SettingsTabContentView,
+ __proto__: WebInspector.TabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.SettingsTabContentView.Type;
+ }
+};
+
+WebInspector.SettingsTabContentView.Type = "settings";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabBrowsercssfromrev183322trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.css (from rev 183322, trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css) (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.css         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.css        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,48 @@
</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.
+ */
+
+.tab-browser {
+ position: relative;
+ overflow: hidden;
+}
+
+.tab-browser > .tab-bar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+}
+
+.tab-browser > .content-view-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+
+.tab-browser > .tab-bar + .content-view-container {
+ top: 31px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabBrowserjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,324 @@
</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.TabBrowser = class TabBrowser extends WebInspector.Object
+{
+ constructor(element, tabBar, navigationSidebar, detailsSidebar)
+ {
+ super();
+
+ this._element = element || document.createElement("div");
+ this._element.classList.add("tab-browser");
+
+ this._tabBar = tabBar || new WebInspector.TabBar;
+ if (!tabBar)
+ this._element.appendChild(this._tabBar.element);
+
+ this._navigationSidebar = navigationSidebar || null;
+ this._detailsSidebar = detailsSidebar || null;
+
+ if (this._navigationSidebar)
+ this._navigationSidebar.addEventListener(WebInspector.Sidebar.Event.CollapsedStateDidChange, this._sidebarCollapsedStateDidChange, this);
+
+ if (this._detailsSidebar) {
+ this._detailsSidebar.addEventListener(WebInspector.Sidebar.Event.CollapsedStateDidChange, this._sidebarCollapsedStateDidChange, this);
+ this._detailsSidebar.addEventListener(WebInspector.Sidebar.Event.SidebarPanelSelected, this._sidebarPanelSelected, this);
+ }
+
+ this._contentViewContainer = new WebInspector.ContentViewContainer;
+ this._element.appendChild(this._contentViewContainer.element);
+
+ // FIXME: Support creating new tabs.
+ // this._tabBar.newTabItem = new WebInspector.TabBarItem(platformImagePath("NewTabPlus.svg"), WebInspector.UIString("Create a new tab"), true);
+
+ this._tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemSelected, this._tabBarItemSelected, this);
+ this._tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemRemoved, this._tabBarItemRemoved, this);
+
+ this._recentTabContentViews = [];
+ }
+
+ // Public
+
+ get element()
+ {
+ return this._element;
+ }
+
+ get tabBar()
+ {
+ return this._tabBar;
+ }
+
+ get navigationSidebar()
+ {
+ return this._navigationSidebar;
+ }
+
+ get detailsSidebar()
+ {
+ return this._detailsSidebar;
+ }
+
+ get selectedTabContentView()
+ {
+ return this._contentViewContainer.currentContentView;
+ }
+
+ updateLayout()
+ {
+ this._tabBar.updateLayout();
+ this._contentViewContainer.updateLayout();
+ }
+
+ bestTabContentViewForRepresentedObject(representedObject)
+ {
+ console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]);
+
+ for (var tabContentView of this._recentTabContentViews) {
+ if (tabContentView.canShowRepresentedObject(representedObject))
+ return tabContentView;
+ }
+
+ return null;
+ }
+
+ addTabForContentView(tabContentView, doNotAnimate)
+ {
+ console.assert(tabContentView instanceof WebInspector.TabContentView);
+ if (!(tabContentView instanceof WebInspector.TabContentView))
+ return false;
+
+ var tabBarItem = tabContentView.tabBarItem;
+
+ console.assert(tabBarItem instanceof WebInspector.TabBarItem);
+ if (!(tabBarItem instanceof WebInspector.TabBarItem))
+ return false;
+
+ if (tabBarItem.representedObject !== tabContentView)
+ tabBarItem.representedObject = tabContentView;
+
+ tabContentView.parentTabBrowser = this;
+
+ if (tabBarItem.parentTabBar === this._tabBar)
+ return true;
+
+ // Add the tab after the first tab content view, since the first
+ // tab content view is the currently selected one.
+ if (this._recentTabContentViews.length && this.selectedTabContentView)
+ this._recentTabContentViews.splice(1, 0, tabContentView);
+ else
+ this._recentTabContentViews.push(tabContentView);
+
+ this._tabBar.addTabBarItem(tabBarItem, doNotAnimate);
+
+ console.assert(this._recentTabContentViews.length === this._tabBar.tabBarItems.length - (this._tabBar.newTabItem ? 1 : 0));
+ console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]);
+
+ return true;
+ }
+
+ showTabForContentView(tabContentView, doNotAnimate)
+ {
+ if (!this.addTabForContentView(tabContentView, doNotAnimate))
+ return false;
+
+ this._tabBar.selectedTabBarItem = tabContentView.tabBarItem;
+
+ return true;
+ }
+
+ closeTabForContentView(tabContentView, doNotAnimate)
+ {
+ console.assert(tabContentView instanceof WebInspector.TabContentView);
+ if (!(tabContentView instanceof WebInspector.TabContentView))
+ return false;
+
+ console.assert(tabContentView.tabBarItem instanceof WebInspector.TabBarItem);
+ if (!(tabContentView.tabBarItem instanceof WebInspector.TabBarItem))
+ return false;
+
+ if (tabBarItem.parentTabBar !== this._tabBar)
+ return false;
+
+ this._tabBar.removeTabBarItem(tabBarItem, doNotAnimate);
+
+ console.assert(this._recentTabContentViews.length === this._tabBar.tabBarItems.length - (this._tabBar.newTabItem ? 1 : 0));
+ console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]);
+
+ return true;
+ }
+
+ // Private
+
+ _tabBarItemSelected(event)
+ {
+ var tabContentView = this._tabBar.selectedTabBarItem.representedObject;
+
+ if (tabContentView) {
+ this._recentTabContentViews.remove(tabContentView);
+ this._recentTabContentViews.unshift(tabContentView);
+
+ this._contentViewContainer.showContentView(tabContentView);
+
+ console.assert(this.selectedTabContentView);
+ console.assert(this._recentTabContentViews.length === this._tabBar.tabBarItems.length - (this._tabBar.newTabItem ? 1 : 0));
+ console.assert(this.selectedTabContentView === this._recentTabContentViews[0]);
+ } else {
+ this._contentViewContainer.closeAllContentViews();
+
+ console.assert(!this.selectedTabContentView);
+ }
+
+ this._showNavigationSidebarPanelForTabContentView(tabContentView);
+ this._showDetailsSidebarPanelsForTabContentView(tabContentView);
+
+ this.dispatchEventToListeners(WebInspector.TabBrowser.Event.SelectedTabContentViewDidChange);
+ }
+
+ _tabBarItemRemoved(event)
+ {
+ var tabContentView = event.data.tabBarItem.representedObject;
+
+ console.assert(tabContentView);
+ if (!tabContentView)
+ return;
+
+ this._recentTabContentViews.remove(tabContentView);
+ this._contentViewContainer.closeContentView(tabContentView);
+
+ tabContentView.parentTabBrowser = null;
+
+ console.assert(this._recentTabContentViews.length === this._tabBar.tabBarItems.length - (this._tabBar.newTabItem ? 1 : 0));
+ console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]);
+ }
+
+ _sidebarPanelSelected(event)
+ {
+ if (this._ignoreSidebarEvents)
+ return;
+
+ var tabContentView = this.selectedTabContentView;
+ if (!tabContentView)
+ return;
+
+ console.assert(event.target === this._detailsSidebar);
+
+ if (tabContentView.managesDetailsSidebarPanels)
+ return;
+
+ var selectedSidebarPanel = this._detailsSidebar.selectedSidebarPanel;
+ tabContentView.detailsSidebarSelectedPanelSetting.value = selectedSidebarPanel ? selectedSidebarPanel.identifier : null;
+ }
+
+ _sidebarCollapsedStateDidChange(event)
+ {
+ if (this._ignoreSidebarEvents)
+ return;
+
+ var tabContentView = this.selectedTabContentView;
+ if (!tabContentView)
+ return;
+
+ if (event.target === this._navigationSidebar)
+ tabContentView.navigationSidebarCollapsedSetting.value = this._navigationSidebar.collapsed;
+ else if (event.target === this._detailsSidebar && !tabContentView.managesDetailsSidebarPanels)
+ tabContentView.detailsSidebarCollapsedSetting.value = this._detailsSidebar.collapsed;
+ }
+
+ _showNavigationSidebarPanelForTabContentView(tabContentView)
+ {
+ if (!this._navigationSidebar)
+ return;
+
+ this._ignoreSidebarEvents = true;
+
+ this._navigationSidebar.removeSidebarPanel(0);
+
+ console.assert(!this._navigationSidebar.sidebarPanels.length);
+
+ if (!tabContentView) {
+ this._ignoreSidebarEvents = false;
+ return;
+ }
+
+ var navigationSidebarPanel = tabContentView.navigationSidebarPanel;
+ if (!navigationSidebarPanel) {
+ this._navigationSidebar.collapsed = true;
+ this._ignoreSidebarEvents = false;
+ return;
+ }
+
+ this._navigationSidebar.addSidebarPanel(navigationSidebarPanel);
+ this._navigationSidebar.selectedSidebarPanel = navigationSidebarPanel;
+
+ this._navigationSidebar.collapsed = tabContentView.navigationSidebarCollapsedSetting.value;
+
+ this._ignoreSidebarEvents = false;
+ }
+
+ _showDetailsSidebarPanelsForTabContentView(tabContentView)
+ {
+ if (!this._detailsSidebar)
+ return;
+
+ this._ignoreSidebarEvents = true;
+
+ for (var i = this._detailsSidebar.sidebarPanels.length - 1; i >= 0; --i)
+ this._detailsSidebar.removeSidebarPanel(i);
+
+ console.assert(!this._detailsSidebar.sidebarPanels.length);
+
+ if (!tabContentView) {
+ this._ignoreSidebarEvents = false;
+ return;
+ }
+
+ if (tabContentView.managesDetailsSidebarPanels) {
+ tabContentView.showDetailsSidebarPanels();
+ this._ignoreSidebarEvents = false;
+ return;
+ }
+
+ var detailsSidebarPanels = tabContentView.detailsSidebarPanels;
+ if (!detailsSidebarPanels) {
+ this._detailsSidebar.collapsed = true;
+ this._ignoreSidebarEvents = false;
+ return;
+ }
+
+ for (var detailsSidebarPanel of detailsSidebarPanels)
+ this._detailsSidebar.addSidebarPanel(detailsSidebarPanel);
+
+ this._detailsSidebar.selectedSidebarPanel = tabContentView.detailsSidebarSelectedPanelSetting.value || detailsSidebarPanels[0];
+
+ this._detailsSidebar.collapsed = tabContentView.detailsSidebarCollapsedSetting.value || !detailsSidebarPanels.length;
+
+ this._ignoreSidebarEvents = false;
+ }
+};
+
+WebInspector.TabBrowser.Event = {
+ SelectedTabContentViewDidChange: "tab-browser-selected-tab-content-view-did-change"
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTabContentViewjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,132 @@
</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.TabContentView = function(identifier, styleClassNames, tabBarItem, navigationSidebarPanel, detailsSidebarPanels)
+{
+ console.assert(typeof identifier === "string");
+ console.assert(typeof styleClassNames === "string" || styleClassNames.every(function(className) { return typeof className === "string"; }));
+ console.assert(tabBarItem instanceof WebInspector.TabBarItem);
+ console.assert(!navigationSidebarPanel || navigationSidebarPanel instanceof WebInspector.NavigationSidebarPanel);
+ console.assert(!detailsSidebarPanels || detailsSidebarPanels.every(function(detailsSidebarPanel) { return detailsSidebarPanel instanceof WebInspector.DetailsSidebarPanel; }));
+
+ WebInspector.ContentView.call(this, null);
+
+ this.element.classList.add("tab");
+
+ if (typeof styleClassNames === "string")
+ styleClassNames = [styleClassNames];
+
+ this.element.classList.add(...styleClassNames);
+
+ this._identifier = identifier;
+ this._tabBarItem = tabBarItem;
+ this._navigationSidebarPanel = navigationSidebarPanel || null;
+ this._detailsSidebarPanels = detailsSidebarPanels || [];
+
+ this._navigationSidebarCollapsedSetting = new WebInspector.Setting(identifier + "-navigation-sidebar-collapsed", false);
+
+ this._detailsSidebarCollapsedSetting = new WebInspector.Setting(identifier + "-details-sidebar-collapsed", true);
+ this._detailsSidebarSelectedPanelSetting = new WebInspector.Setting(identifier + "-details-sidebar-selected-panel", null);
+};
+
+WebInspector.TabContentView.prototype = {
+ constructor: WebInspector.TabContentView,
+ __proto__: WebInspector.ContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ // Implemented by subclasses.
+ return null;
+ },
+
+ get parentTabBrowser()
+ {
+ return this._parentTabBrowser;
+ },
+
+ set parentTabBrowser(tabBrowser)
+ {
+ this._parentTabBrowser = tabBrowser || null;
+ },
+
+ get identifier()
+ {
+ return this._identifier;
+ },
+
+ get tabBarItem()
+ {
+ return this._tabBarItem;
+ },
+
+ get managesDetailsSidebarPanels()
+ {
+ // Implemented by subclasses.
+ return false;
+ },
+
+ showDetailsSidebarPanels: function()
+ {
+ // Implemented by subclasses.
+ },
+
+ showRepresentedObject: function(representedObject, cookie)
+ {
+ // Implemented by subclasses.
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ // Implemented by subclasses.
+ return false;
+ },
+
+ get navigationSidebarPanel()
+ {
+ return this._navigationSidebarPanel;
+ },
+
+ get navigationSidebarCollapsedSetting()
+ {
+ return this._navigationSidebarCollapsedSetting;
+ },
+
+ get detailsSidebarPanels()
+ {
+ return this._detailsSidebarPanels;
+ },
+
+ get detailsSidebarCollapsedSetting()
+ {
+ return this._detailsSidebarCollapsedSetting;
+ },
+
+ get detailsSidebarSelectedPanelSetting()
+ {
+ return this._detailsSidebarSelectedPanelSetting;
+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineTabContentViewjsfromrev183322trunkSourceWebInspectorUIUserInterfaceViewsCodeMirrorOverridescss"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (from rev 183322, trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorOverrides.css) (0 => 183323)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js        2015-04-26 01:16:22 UTC (rev 183323)
</span><span class="lines">@@ -0,0 +1,59 @@
</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.TimelineTabContentView = function(identifier)
+{
+ var tabBarItem = new WebInspector.TabBarItem("Images/Timeline.svg", WebInspector.UIString("Timelines"));
+ var detailsSidebarPanels = [WebInspector.resourceDetailsSidebarPanel, WebInspector.probeDetailsSidebarPanel, WebInspector.renderingFrameDetailsSidebarPanel];
+
+ // FIME: Until TimelineSidebarPanel supports instantiating after inspector launch, disable closing.
+ tabBarItem.hideCloseButton = true;
+
+ WebInspector.ContentBrowserTabContentView.call(this, identifier || "timeline", "timeline", tabBarItem, WebInspector.TimelineSidebarPanel, detailsSidebarPanels);
+};
+
+WebInspector.TimelineTabContentView.prototype = {
+ constructor: WebInspector.TimelineTabContentView,
+ __proto__: WebInspector.ContentBrowserTabContentView.prototype,
+
+ // Public
+
+ get type()
+ {
+ return WebInspector.TimelineTabContentView.Type;
+ },
+
+ canShowRepresentedObject: function(representedObject)
+ {
+ return representedObject instanceof WebInspector.TimelineRecording;
+ },
+
+ get supportsSplitContentBrowser()
+ {
+ return false;
+ }
+};
+
+WebInspector.TimelineTabContentView.Type = "timeline";
</ins></span></pre>
</div>
</div>
</body>
</html>