<!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>[183335] 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/183335">183335</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-04-25 18:23:04 -0700 (Sat, 25 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Switch over to a tab based UI
https://bugs.webkit.org/show_bug.cgi?id=144154
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector._tabContentViewForType):
(WebInspector._rememberOpenTabs):
(WebInspector._windowResized):
(WebInspector._tabBrowserSizeDidChange):
(WebInspector._quickConsoleDidResize):
(WebInspector._sidebarWidthDidChange):
(WebInspector._tabBrowserSelectedTabContentViewDidChange):
(WebInspector._inspectModeStateChanged):
(WebInspector._focusedContentView):
* UserInterface/Main.html:
* UserInterface/Views/Main.css:
(#tab-browser):</pre>
<h3>Modified Paths</h3>
<ul>
<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="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsMaincss">trunk/Source/WebInspectorUI/UserInterface/Views/Main.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (183334 => 183335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:22:33 UTC (rev 183334)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:23:04 UTC (rev 183335)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-04-24 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Switch over to a tab based UI
+ https://bugs.webkit.org/show_bug.cgi?id=144154
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.loaded):
+ (WebInspector.contentLoaded):
+ (WebInspector._tabContentViewForType):
+ (WebInspector._rememberOpenTabs):
+ (WebInspector._windowResized):
+ (WebInspector._tabBrowserSizeDidChange):
+ (WebInspector._quickConsoleDidResize):
+ (WebInspector._sidebarWidthDidChange):
+ (WebInspector._tabBrowserSelectedTabContentViewDidChange):
+ (WebInspector._inspectModeStateChanged):
+ (WebInspector._focusedContentView):
+ * UserInterface/Main.html:
+ * UserInterface/Views/Main.css:
+ (#tab-browser):
+
</ins><span class="cx"> 2015-04-23 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove Main.js code we don't need for Tabs
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (183334 => 183335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-04-26 01:22:33 UTC (rev 183334)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-04-26 01:23:04 UTC (rev 183335)
</span><span class="lines">@@ -97,6 +97,7 @@
</span><span class="cx"> localizedStrings["Clear Timeline"] = "Clear Timeline";
</span><span class="cx"> localizedStrings["Clear log (%s or %s)"] = "Clear log (%s or %s)";
</span><span class="cx"> localizedStrings["Click Listener"] = "Click Listener";
</span><ins>+localizedStrings["Click to close this tab"] = "Click to close this tab";
</ins><span class="cx"> localizedStrings["Click to open a colorpicker. Shift-click to change color format."] = "Click to open a colorpicker. Shift-click to change color format.";
</span><span class="cx"> localizedStrings["Clickable"] = "Clickable";
</span><span class="cx"> localizedStrings["Close"] = "Close";
</span><span class="lines">@@ -113,9 +114,9 @@
</span><span class="cx"> localizedStrings["Conditional expression"] = "Conditional expression";
</span><span class="cx"> localizedStrings["Console"] = "Console";
</span><span class="cx"> localizedStrings["Console Profile Recorded"] = "Console Profile Recorded";
</span><del>-localizedStrings["Console errors, click to show the Console"] = "Console errors, click to show the Console";
-localizedStrings["Console logs, click to show the Console"] = "Console logs, click to show the Console";
-localizedStrings["Console warnings, click to show the Console"] = "Console warnings, click to show the Console";
</del><ins>+localizedStrings["Console errors, click to show the Console tab"] = "Console errors, click to show the Console tab";
+localizedStrings["Console logs, click to show the Console tab"] = "Console logs, click to show the Console tab";
+localizedStrings["Console warnings, click to show the Console tab"] = "Console warnings, click to show the Console tab";
</ins><span class="cx"> localizedStrings["Container Regions"] = "Container Regions";
</span><span class="cx"> localizedStrings["Content"] = "Content";
</span><span class="cx"> localizedStrings["Content Flow"] = "Content Flow";
</span><span class="lines">@@ -128,6 +129,7 @@
</span><span class="cx"> localizedStrings["Copy Row"] = "Copy Row";
</span><span class="cx"> localizedStrings["Copy as HTML"] = "Copy as HTML";
</span><span class="cx"> localizedStrings["Could not fetch properties. Object may no longer exist."] = "Could not fetch properties. Object may no longer exist.";
</span><ins>+localizedStrings["Create a new tab"] = "Create a new tab";
</ins><span class="cx"> localizedStrings["DOM Tree"] = "DOM Tree";
</span><span class="cx"> localizedStrings["Data"] = "Data";
</span><span class="cx"> localizedStrings["Data returned from the database is too large."] = "Data returned from the database is too large.";
</span><span class="lines">@@ -148,7 +150,6 @@
</span><span class="cx"> localizedStrings["Disable Breakpoints"] = "Disable Breakpoints";
</span><span class="cx"> localizedStrings["Disable all breakpoints (%s)"] = "Disable all breakpoints (%s)";
</span><span class="cx"> localizedStrings["Disable paint flashing"] = "Disable paint flashing";
</span><del>-localizedStrings["Disable point to inspect mode (%s)"] = "Disable point to inspect mode (%s)";
</del><span class="cx"> localizedStrings["Disabled"] = "Disabled";
</span><span class="cx"> localizedStrings["Dock to bottom of window"] = "Dock to bottom of window";
</span><span class="cx"> localizedStrings["Dock to right of window"] = "Dock to right of window";
</span><span class="lines">@@ -158,7 +159,6 @@
</span><span class="cx"> localizedStrings["Documents"] = "Documents";
</span><span class="cx"> localizedStrings["Domain"] = "Domain";
</span><span class="cx"> localizedStrings["Done"] = "Done";
</span><del>-localizedStrings["Download Web Archive"] = "Download Web Archive";
</del><span class="cx"> localizedStrings["Duration"] = "Duration";
</span><span class="cx"> localizedStrings["Dynamically calculated for the parent element"] = "Dynamically calculated for the parent element";
</span><span class="cx"> localizedStrings["Dynamically calculated for the selected element"] = "Dynamically calculated for the selected element";
</span><span class="lines">@@ -195,11 +195,11 @@
</span><span class="cx"> localizedStrings["Element is masked and composited descendants"] = "Element is masked and composited descendants";
</span><span class="cx"> localizedStrings["Element is the root element"] = "Element is the root element";
</span><span class="cx"> localizedStrings["Element overlaps other compositing element"] = "Element overlaps other compositing element";
</span><ins>+localizedStrings["Elements"] = "Elements";
</ins><span class="cx"> localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
</span><span class="cx"> localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
</span><span class="cx"> localizedStrings["Enable all breakpoints (%s)"] = "Enable all breakpoints (%s)";
</span><span class="cx"> localizedStrings["Enable paint flashing"] = "Enable paint flashing";
</span><del>-localizedStrings["Enable point to inspect mode (%s)"] = "Enable point to inspect mode (%s)";
</del><span class="cx"> localizedStrings["Encoded"] = "Encoded";
</span><span class="cx"> localizedStrings["Encoding"] = "Encoding";
</span><span class="cx"> localizedStrings["End Capturing"] = "End Capturing";
</span><span class="lines">@@ -245,12 +245,9 @@
</span><span class="cx"> localizedStrings["Height"] = "Height";
</span><span class="cx"> localizedStrings["Hide Replay Controls"] = "Hide Replay Controls";
</span><span class="cx"> localizedStrings["Hide compositing borders"] = "Hide compositing borders";
</span><del>-localizedStrings["Hide console (%s)"] = "Hide console (%s)";
</del><span class="cx"> localizedStrings["Hide shadow DOM nodes"] = "Hide shadow DOM nodes";
</span><del>-localizedStrings["Hide the %s details sidebar"] = "Hide the %s details sidebar";
-localizedStrings["Hide the %s details sidebar (%s)"] = "Hide the %s details sidebar (%s)";
-localizedStrings["Hide the %s navigation sidebar"] = "Hide the %s navigation sidebar";
-localizedStrings["Hide the %s navigation sidebar (%s)"] = "Hide the %s navigation sidebar (%s)";
</del><ins>+localizedStrings["Hide the details sidebar (%s)"] = "Hide the details sidebar (%s)";
+localizedStrings["Hide the navigation sidebar (%s)"] = "Hide the navigation sidebar (%s)";
</ins><span class="cx"> localizedStrings["Hide type information"] = "Hide type information";
</span><span class="cx"> localizedStrings["Host"] = "Host";
</span><span class="cx"> localizedStrings["Icon Only"] = "Icon Only";
</span><span class="lines">@@ -269,7 +266,6 @@
</span><span class="cx"> localizedStrings["Inherited From: "] = "Inherited From: ";
</span><span class="cx"> localizedStrings["Initiator"] = "Initiator";
</span><span class="cx"> localizedStrings["Input: "] = "Input: ";
</span><del>-localizedStrings["Inspect"] = "Inspect";
</del><span class="cx"> localizedStrings["Invalid"] = "Invalid";
</span><span class="cx"> localizedStrings["Invoke getter"] = "Invoke getter";
</span><span class="cx"> localizedStrings["JavaScript & Events"] = "JavaScript & Events";
</span><span class="lines">@@ -382,7 +378,6 @@
</span><span class="cx"> localizedStrings["Refresh"] = "Refresh";
</span><span class="cx"> localizedStrings["Region Flow"] = "Region Flow";
</span><span class="cx"> localizedStrings["Region announced in its entirety."] = "Region announced in its entirety.";
</span><del>-localizedStrings["Reload page (%s)\nReload ignoring cache (%s)"] = "Reload page (%s)\nReload ignoring cache (%s)";
</del><span class="cx"> localizedStrings["Removals"] = "Removals";
</span><span class="cx"> localizedStrings["Remove this breakpoint action"] = "Remove this breakpoint action";
</span><span class="cx"> localizedStrings["Rendering Frames"] = "Rendering Frames";
</span><span class="lines">@@ -398,11 +393,10 @@
</span><span class="cx"> localizedStrings["Resources"] = "Resources";
</span><span class="cx"> localizedStrings["Response"] = "Response";
</span><span class="cx"> localizedStrings["Response Headers"] = "Response Headers";
</span><del>-localizedStrings["Restart (%s)"] = "Restart (%s)";
</del><span class="cx"> localizedStrings["Return type for anonymous function"] = "Return type for anonymous function";
</span><span class="cx"> localizedStrings["Return type for function: %s"] = "Return type for function: %s";
</span><span class="cx"> localizedStrings["Reveal in DOM Tree"] = "Reveal in DOM Tree";
</span><del>-localizedStrings["Reveal in Debugger Navigation Sidebar"] = "Reveal in Debugger Navigation Sidebar";
</del><ins>+localizedStrings["Reveal in Debugger Tab"] = "Reveal in Debugger Tab";
</ins><span class="cx"> localizedStrings["Reveal in Original Resource"] = "Reveal in Original Resource";
</span><span class="cx"> localizedStrings["Role"] = "Role";
</span><span class="cx"> localizedStrings["Rules"] = "Rules";
</span><span class="lines">@@ -427,24 +421,21 @@
</span><span class="cx"> localizedStrings["Session Storage"] = "Session Storage";
</span><span class="cx"> localizedStrings["Set to Automatically Continue"] = "Set to Automatically Continue";
</span><span class="cx"> localizedStrings["Setter"] = "Setter";
</span><ins>+localizedStrings["Settings"] = "Settings";
</ins><span class="cx"> localizedStrings["Shadow Content"] = "Shadow Content";
</span><span class="cx"> localizedStrings["Shared Focus"] = "Shared Focus";
</span><span class="cx"> localizedStrings["Show All"] = "Show All";
</span><span class="cx"> localizedStrings["Show All Nodes (%d More)"] = "Show All Nodes (%d More)";
</span><span class="cx"> localizedStrings["Show Replay Controls"] = "Show Replay Controls";
</span><span class="cx"> localizedStrings["Show compositing borders"] = "Show compositing borders";
</span><del>-localizedStrings["Show console (%s)"] = "Show console (%s)";
-localizedStrings["Show full-height console"] = "Show full-height console";
</del><ins>+localizedStrings["Show console tab"] = "Show console tab";
</ins><span class="cx"> localizedStrings["Show only resources with breakpoints."] = "Show only resources with breakpoints.";
</span><span class="cx"> localizedStrings["Show only resources with issues."] = "Show only resources with issues.";
</span><span class="cx"> localizedStrings["Show resources with and without breakpoints."] = "Show resources with and without breakpoints.";
</span><span class="cx"> localizedStrings["Show resources with and without issues."] = "Show resources with and without issues.";
</span><span class="cx"> localizedStrings["Show shadow DOM nodes"] = "Show shadow DOM nodes";
</span><del>-localizedStrings["Show split console"] = "Show split console";
-localizedStrings["Show the %s details sidebar"] = "Show the %s details sidebar";
-localizedStrings["Show the %s details sidebar (%s)"] = "Show the %s details sidebar (%s)";
-localizedStrings["Show the %s navigation sidebar"] = "Show the %s navigation sidebar";
-localizedStrings["Show the %s navigation sidebar (%s)"] = "Show the %s navigation sidebar (%s)";
</del><ins>+localizedStrings["Show the details sidebar (%s)"] = "Show the details sidebar (%s)";
+localizedStrings["Show the navigation sidebar (%s)"] = "Show the navigation sidebar (%s)";
</ins><span class="cx"> localizedStrings["Show type information"] = "Show type information";
</span><span class="cx"> localizedStrings["Size"] = "Size";
</span><span class="cx"> localizedStrings["Small Icons"] = "Small Icons";
</span><span class="lines">@@ -475,7 +466,6 @@
</span><span class="cx"> localizedStrings["Text Only"] = "Text Only";
</span><span class="cx"> localizedStrings["The %s \ntable is empty."] = "The %s \ntable is empty.";
</span><span class="cx"> localizedStrings["Time"] = "Time";
</span><del>-localizedStrings["Time until the load event fired, click to show the Network Requests timeline"] = "Time until the load event fired, click to show the Network Requests timeline";
</del><span class="cx"> localizedStrings["Timeline Events"] = "Timeline Events";
</span><span class="cx"> localizedStrings["Timeline Recording %d"] = "Timeline Recording %d";
</span><span class="cx"> localizedStrings["Timelines"] = "Timelines";
</span><span class="lines">@@ -486,8 +476,7 @@
</span><span class="cx"> localizedStrings["Timer Installed"] = "Timer Installed";
</span><span class="cx"> localizedStrings["Timer Removed"] = "Timer Removed";
</span><span class="cx"> localizedStrings["Total Time"] = "Total Time";
</span><del>-localizedStrings["Total number of resources, click to show the Resources navigation sidebar"] = "Total number of resources, click to show the Resources navigation sidebar";
-localizedStrings["Total size of all resources, click to show the Network Requests timeline"] = "Total size of all resources, click to show the Network Requests timeline";
</del><ins>+localizedStrings["Total number of resources, click to show the Resources tab"] = "Total number of resources, click to show the Resources tab";
</ins><span class="cx"> localizedStrings["Transfered"] = "Transfered";
</span><span class="cx"> localizedStrings["Triggered Breakpoint"] = "Triggered Breakpoint";
</span><span class="cx"> localizedStrings["Type"] = "Type";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183334 => 183335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:22:33 UTC (rev 183334)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:23:04 UTC (rev 183335)
</span><span class="lines">@@ -151,6 +151,9 @@
</span><span class="cx">
</span><span class="cx"> this._dockButtonToggledSetting = new WebInspector.Setting("dock-button-toggled", false);
</span><span class="cx">
</span><ins>+ this._openTabsSetting = new WebInspector.Setting("open-tabs", ["elements", "resources", "timeline", "debugger", "console"]);
+ this._selectedTabIndexSetting = new WebInspector.Setting("selected-tab-index", 0);
+
</ins><span class="cx"> this.showShadowDOMSetting = new WebInspector.Setting("show-shadow-dom", false);
</span><span class="cx"> this.showReplayInterfaceSetting = new WebInspector.Setting("show-web-replay", false);
</span><span class="cx">
</span><span class="lines">@@ -204,6 +207,8 @@
</span><span class="cx"> this.toolbar.addEventListener(WebInspector.Toolbar.Event.DisplayModeDidChange, this._toolbarDisplayModeDidChange, this);
</span><span class="cx"> this.toolbar.addEventListener(WebInspector.Toolbar.Event.SizeModeDidChange, this._toolbarSizeModeDidChange, this);
</span><span class="cx">
</span><ins>+ this.tabBar = new WebInspector.TabBar(document.getElementById("tab-bar"));
+
</ins><span class="cx"> var contentElement = document.getElementById("content");
</span><span class="cx"> contentElement.setAttribute("role", "main");
</span><span class="cx"> contentElement.setAttribute("aria-label", WebInspector.UIString("Content"));
</span><span class="lines">@@ -287,6 +292,23 @@
</span><span class="cx"> this._updateDockNavigationItems();
</span><span class="cx"> this._updateToolbarHeight();
</span><span class="cx">
</span><ins>+ for (var tabType of this._openTabsSetting.value) {
+ var tabContentView = this._tabContentViewForType(tabType);
+ if (!tabContentView)
+ continue;
+ this.tabBrowser.addTabForContentView(tabContentView, true);
+ }
+
+ this.tabBar.selectedTabBarItem = this._selectedTabIndexSetting.value;
+
+ if (!this.tabBar.selectedTabBarItem)
+ this.tabBar.selectedTabBarItem = 0;
+
+ // Listen to the events after restoring the saved tabs to avoid recursion.
+ this.tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemAdded, this._rememberOpenTabs, this);
+ this.tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemRemoved, this._rememberOpenTabs, this);
+ this.tabBar.addEventListener(WebInspector.TabBar.Event.TabBarItemsReordered, this._rememberOpenTabs, this);
+
</ins><span class="cx"> // Signal that the frontend is now ready to receive messages.
</span><span class="cx"> InspectorFrontendAPI.loadCompleted();
</span><span class="cx">
</span><span class="lines">@@ -304,6 +326,41 @@
</span><span class="cx"> this.runBootstrapOperations();
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+WebInspector._tabContentViewForType = function(tabType)
+{
+ switch (tabType) {
+ case WebInspector.ElementsTabContentView.Type:
+ return new WebInspector.ElementsTabContentView;
+ case WebInspector.ResourcesTabContentView.Type:
+ return new WebInspector.ResourcesTabContentView;
+ case WebInspector.TimelineTabContentView.Type:
+ return new WebInspector.TimelineTabContentView;
+ case WebInspector.DebuggerTabContentView.Type:
+ return new WebInspector.DebuggerTabContentView;
+ case WebInspector.ConsoleTabContentView.Type:
+ return new WebInspector.ConsoleTabContentView;
+ default:
+ console.error("Unknown tab type", tabType);
+ }
+
+ return null;
+};
+
+WebInspector._rememberOpenTabs = function()
+{
+ var openTabs = [];
+
+ for (var tabBarItem of this.tabBar.tabBarItems) {
+ var tabContentView = tabBarItem.representedObject;
+ if (tabContentView instanceof WebInspector.SettingsTabContentView)
+ continue;
+ console.assert(tabContentView.type, "Tab type can't be null, undefined, or empty string", tabContentView.type, tabContentView);
+ openTabs.push(tabContentView.type);
+ }
+
+ this._openTabsSetting.value = openTabs;
+};
+
</ins><span class="cx"> WebInspector.activateExtraDomains = function(domains)
</span><span class="cx"> {
</span><span class="cx"> this.hasExtraDomains = true;
</span><span class="lines">@@ -922,8 +979,7 @@
</span><span class="cx"> WebInspector._windowResized = function(event)
</span><span class="cx"> {
</span><span class="cx"> this.toolbar.updateLayout();
</span><del>-
- this._contentBrowserSizeDidChange(event);
</del><ins>+ this._tabBrowserSizeDidChange();
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector._updateModifierKeys = function(event)
</span><span class="lines">@@ -990,21 +1046,21 @@
</span><span class="cx"> this.undockButtonNavigationItem.toggled = this._dockButtonToggledSetting.value;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector._contentBrowserSizeDidChange = function(event)
</del><ins>+WebInspector._tabBrowserSizeDidChange = function()
</ins><span class="cx"> {
</span><del>- this.contentBrowser.updateLayout();
</del><ins>+ this.tabBrowser.updateLayout();
</ins><span class="cx"> this.splitContentBrowser.updateLayout();
</span><span class="cx"> this.quickConsole.updateLayout();
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector._quickConsoleDidResize = function(event)
</span><span class="cx"> {
</span><del>- this.contentBrowser.updateLayout();
</del><ins>+ this.tabBrowser.updateLayout();
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector._sidebarWidthDidChange = function(event)
</span><span class="cx"> {
</span><del>- this._contentBrowserSizeDidChange(event);
</del><ins>+ this._tabBrowserSizeDidChange();
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector._updateToolbarHeight = function()
</span><span class="lines">@@ -1043,6 +1099,18 @@
</span><span class="cx"> this._updateToolbarHeight();
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+WebInspector._tabBrowserSelectedTabContentViewDidChange = function(event)
+{
+ if (this.tabBar.selectedTabBarItem)
+ this._selectedTabIndexSetting.value = this.tabBar.tabBarItems.indexOf(this.tabBar.selectedTabBarItem);
+
+ if (!this.doesCurrentTabSupportSplitContentBrowser())
+ this.hideSplitConsole();
+
+ if (!this.isShowingSplitConsole())
+ this.quickConsole.consoleLogVisibilityChanged(this.isShowingConsoleTab());
+};
+
</ins><span class="cx"> WebInspector._initializeWebSocketIfNeeded = function()
</span><span class="cx"> {
</span><span class="cx"> if (!InspectorFrontendHost.initializeWebSocket)
</span><span class="lines">@@ -1252,7 +1320,7 @@
</span><span class="cx">
</span><span class="cx"> WebInspector._inspectModeStateChanged = function(event)
</span><span class="cx"> {
</span><del>- this._inspectModeToolbarButton.activated = WebInspector.domTreeManager.inspectModeEnabled;
</del><ins>+// this._inspectModeToolbarButton.activated = WebInspector.domTreeManager.inspectModeEnabled;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector._toggleInspectMode = function(event)
</span><span class="lines">@@ -1282,8 +1350,8 @@
</span><span class="cx">
</span><span class="cx"> WebInspector._focusedContentView = function()
</span><span class="cx"> {
</span><del>- if (this.contentBrowser.element.isSelfOrAncestor(this.currentFocusElement))
- return this.contentBrowser.currentContentView;
</del><ins>+ if (this.tabBrowser.element.isSelfOrAncestor(this.currentFocusElement))
+ return this.tabBrowser.selectedTabContentView;
</ins><span class="cx"> if (this.splitContentBrowser.element.isSelfOrAncestor(this.currentFocusElement))
</span><span class="cx"> return this.splitContentBrowser.currentContentView;
</span><span class="cx"> return null;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (183334 => 183335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-04-26 01:22:33 UTC (rev 183334)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-04-26 01:23:04 UTC (rev 183335)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> <link rel="stylesheet" href="Views/ConsoleMessageView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ConsolePrompt.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ContentBrowser.css">
</span><ins>+ <link rel="stylesheet" href="Views/ContentBrowserTabContentView.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/ContentFlowIcon.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ContentView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ContentViewContainer.css">
</span><span class="lines">@@ -64,14 +65,14 @@
</span><span class="cx"> <link rel="stylesheet" href="Views/DOMTreeDataGrid.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DOMTreeOutline.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DashboardContainerView.css">
</span><del>- <link rel="stylesheet" href="Views/DebuggerDashboardView.css">
- <link rel="stylesheet" href="Views/DefaultDashboardView.css">
</del><span class="cx"> <link rel="stylesheet" href="Views/DataGrid.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DatabaseContentView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DatabaseIcon.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DatabaseTableContentView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DatabaseTableIcon.css">
</span><ins>+ <link rel="stylesheet" href="Views/DebuggerDashboardView.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/DebuggerSidebarPanel.css">
</span><ins>+ <link rel="stylesheet" href="Views/DefaultDashboardView.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/DetailsSection.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/DividerNavigationItem.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/Editing.css">
</span><span class="lines">@@ -101,10 +102,10 @@
</span><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/ObjectPreviewView.css">
</span><del>- <link rel="stylesheet" href="Views/ObjectTreeView.css">
</del><span class="cx"> <link rel="stylesheet" href="Views/ObjectTreeArrayIndexTreeElement.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ObjectTreeMapEntryTreeElement.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ObjectTreePropertyTreeElement.css">
</span><ins>+ <link rel="stylesheet" href="Views/ObjectTreeView.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/OverviewTimelineView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/PathComponentIcons.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/Popover.css">
</span><span class="lines">@@ -133,6 +134,8 @@
</span><span class="cx"> <link rel="stylesheet" href="Views/SourceCodeTextEditor.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/StyleRuleIcons.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/SyntaxHighlightingDefaultTheme.css">
</span><ins>+ <link rel="stylesheet" href="Views/TabBar.css">
+ <link rel="stylesheet" href="Views/TabBrowser.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/TextContentView.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/TextEditor.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/TextResourceContentView.css">
</span><span class="lines">@@ -311,6 +314,9 @@
</span><span class="cx"> <script src="Views/Section.js"></script>
</span><span class="cx"> <script src="Views/SidebarPanel.js"></script>
</span><span class="cx"> <script src="Views/StyleDetailsPanel.js"></script>
</span><ins>+ <script src="Views/TabBar.js"></script>
+ <script src="Views/TabBarItem.js"></script>
+ <script src="Views/TabBrowser.js"></script>
</ins><span class="cx"> <script src="Views/TextEditor.js"></script>
</span><span class="cx"> <script src="Views/TimelineOverviewGraph.js"></script>
</span><span class="cx"> <script src="Views/TimelineView.js"></script>
</span><span class="lines">@@ -323,19 +329,27 @@
</span><span class="cx"> <script src="Views/NavigationSidebarPanel.js"></script>
</span><span class="cx"> <script src="Views/PropertiesSection.js"></script>
</span><span class="cx"> <script src="Views/ResourceContentView.js"></script>
</span><ins>+ <script src="Views/TabContentView.js"></script>
</ins><span class="cx"> <script src="Views/TimelineDataGrid.js"></script>
</span><span class="cx"> <script src="Views/TimelineDataGridNode.js"></script>
</span><span class="cx">
</span><ins>+ <script src="Views/ContentBrowserTabContentView.js"></script>
</ins><span class="cx"> <script src="Views/DOMDetailsSidebarPanel.js"></script>
</span><del>- <script src="Views/ObjectTreeBaseTreeElement.js"></script>
</del><span class="cx"> <script src="Views/FolderTreeElement.js"></script>
</span><span class="cx"> <script src="Views/FolderizedTreeElement.js"></script>
</span><ins>+ <script src="Views/ObjectTreeBaseTreeElement.js"></script>
</ins><span class="cx"> <script src="Views/SourceCodeTreeElement.js"></script>
</span><span class="cx"> <script src="Views/StorageTreeElement.js"></script>
</span><span class="cx"> <script src="Views/TimelineRecordTreeElement.js"></script>
</span><span class="cx">
</span><ins>+ <script src="Views/ConsoleTabContentView.js"></script>
+ <script src="Views/DebuggerTabContentView.js"></script>
</ins><span class="cx"> <script src="Views/DebuggerTreeElement.js"></script>
</span><ins>+ <script src="Views/ElementsTabContentView.js"></script>
</ins><span class="cx"> <script src="Views/ResourceTreeElement.js"></script>
</span><ins>+ <script src="Views/ResourcesTabContentView.js"></script>
+ <script src="Views/SettingsTabContentView.js"></script>
+ <script src="Views/TimelineTabContentView.js"></script>
</ins><span class="cx">
</span><span class="cx"> <script src="Views/DetailsSection.js"></script>
</span><span class="cx"> <script src="Views/DetailsSectionDataGridRow.js"></script>
</span><span class="lines">@@ -545,10 +559,11 @@
</span><span class="cx"> <body>
</span><span class="cx"> <div id="docked-resizer"></div>
</span><span class="cx"> <div id="toolbar"></div>
</span><ins>+<div id="tab-bar"></div>
</ins><span class="cx"> <div id="main">
</span><span class="cx"> <div id="navigation-sidebar"></div>
</span><span class="cx"> <div id="content">
</span><del>- <div id="content-browser"></div>
</del><ins>+ <div id="tab-browser"></div>
</ins><span class="cx"> <div id="split-content-browser" class="hidden"></div>
</span><span class="cx"> <div id="quick-console"></div>
</span><span class="cx"> </div>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsMaincss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Main.css (183334 => 183335)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-04-26 01:22:33 UTC (rev 183334)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-04-26 01:23:04 UTC (rev 183335)
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> flex: 1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#content-browser {
</del><ins>+#tab-browser {
</ins><span class="cx"> flex: 1;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>