<!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>[183338] 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/183338">183338</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-04-25 18:25:22 -0700 (Sat, 25 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: New Toolbar UI for tabs
https://bugs.webkit.org/show_bug.cgi?id=144185

Reviewed by Joseph Pecoraro.

* UserInterface/Base/ImageUtilities.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._captureDidStart):
(WebInspector._debuggerDidPause):
(WebInspector._debuggerDidResume):
(WebInspector._mainFrameDidChange):
(WebInspector._mainResourceDidChange):
(WebInspector._windowKeyDown):
(WebInspector._windowKeyUp):
(WebInspector._pageHidden):
(WebInspector._undock):
(WebInspector._dockBottom):
(WebInspector._dockRight):
(WebInspector._updateDockNavigationItems):
(WebInspector._domNodeWasInspected):
(WebInspector._inspectModeStateChanged):
(WebInspector._toggleInspectMode):
(WebInspector._downloadWebArchive):
(WebInspector._reloadPageClicked):
(WebInspector._updateDownloadToolbarButton):
(WebInspector.archiveMainFrame):
(WebInspector.canArchiveMainFrame):
* UserInterface/Images/Crosshair.svg:
* UserInterface/Images/DockBottom.svg:
* UserInterface/Images/DockRight.svg:
* UserInterface/Images/DownloadArrow.svg:
* UserInterface/Images/ReloadToolbar.svg: Added.
* UserInterface/Images/Undock.svg:
* UserInterface/Views/ActivateButtonToolbarItem.js:
(WebInspector.ActivateButtonToolbarItem):
(WebInspector.ActivateButtonToolbarItem.prototype.set label):
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button):
(body.window-inactive .toolbar .item.button):
(.toolbar.small-size .item.button &gt; .glyph):
* UserInterface/Views/ButtonToolbarItem.js:
(WebInspector.ButtonToolbarItem):
(WebInspector.ButtonToolbarItem.prototype.set label):
* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard-container):
* UserInterface/Views/Main.css:
(body.docked.bottom):
* UserInterface/Views/Toolbar.css:
(.toolbar):
(body.mac-platform:not(.legacy, .docked) .toolbar):
(.toolbar .control-section):
(.toolbar .item-section):
(.toolbar .item-section.left):
(.toolbar .item-section.center-left):
(.toolbar .item-section.center-right):
(.toolbar .item-section.right):
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout):
(WebInspector.Toolbar.prototype.addToolbarItem):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseImageUtilitiesjs">trunk/Source/WebInspectorUI/UserInterface/Base/ImageUtilities.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesCrosshairsvg">trunk/Source/WebInspectorUI/UserInterface/Images/Crosshair.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesDockBottomsvg">trunk/Source/WebInspectorUI/UserInterface/Images/DockBottom.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesDockRightsvg">trunk/Source/WebInspectorUI/UserInterface/Images/DockRight.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesDownloadArrowsvg">trunk/Source/WebInspectorUI/UserInterface/Images/DownloadArrow.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesUndocksvg">trunk/Source/WebInspectorUI/UserInterface/Images/Undock.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsActivateButtonToolbarItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonToolbarItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsButtonToolbarItemcss">trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsButtonToolbarItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDashboardContainerViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsMaincss">trunk/Source/WebInspectorUI/UserInterface/Views/Main.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsToolbarcss">trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsToolbarjs">trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesReloadToolbarsvg">trunk/Source/WebInspectorUI/UserInterface/Images/ReloadToolbar.svg</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,5 +1,72 @@
</span><span class="cx"> 2015-04-25  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: New Toolbar UI for tabs
+        https://bugs.webkit.org/show_bug.cgi?id=144185
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Base/ImageUtilities.js:
+        * UserInterface/Base/Main.js:
+        (WebInspector.loaded):
+        (WebInspector.contentLoaded):
+        (WebInspector.updateDockedState):
+        (WebInspector._captureDidStart):
+        (WebInspector._debuggerDidPause):
+        (WebInspector._debuggerDidResume):
+        (WebInspector._mainFrameDidChange):
+        (WebInspector._mainResourceDidChange):
+        (WebInspector._windowKeyDown):
+        (WebInspector._windowKeyUp):
+        (WebInspector._pageHidden):
+        (WebInspector._undock):
+        (WebInspector._dockBottom):
+        (WebInspector._dockRight):
+        (WebInspector._updateDockNavigationItems):
+        (WebInspector._domNodeWasInspected):
+        (WebInspector._inspectModeStateChanged):
+        (WebInspector._toggleInspectMode):
+        (WebInspector._downloadWebArchive):
+        (WebInspector._reloadPageClicked):
+        (WebInspector._updateDownloadToolbarButton):
+        (WebInspector.archiveMainFrame):
+        (WebInspector.canArchiveMainFrame):
+        * UserInterface/Images/Crosshair.svg:
+        * UserInterface/Images/DockBottom.svg:
+        * UserInterface/Images/DockRight.svg:
+        * UserInterface/Images/DownloadArrow.svg:
+        * UserInterface/Images/ReloadToolbar.svg: Added.
+        * UserInterface/Images/Undock.svg:
+        * UserInterface/Views/ActivateButtonToolbarItem.js:
+        (WebInspector.ActivateButtonToolbarItem):
+        (WebInspector.ActivateButtonToolbarItem.prototype.set label):
+        * UserInterface/Views/ButtonToolbarItem.css:
+        (.toolbar .item.button):
+        (body.window-inactive .toolbar .item.button):
+        (.toolbar.small-size .item.button &gt; .glyph):
+        * UserInterface/Views/ButtonToolbarItem.js:
+        (WebInspector.ButtonToolbarItem):
+        (WebInspector.ButtonToolbarItem.prototype.set label):
+        * UserInterface/Views/DashboardContainerView.css:
+        (.toolbar .dashboard-container):
+        * UserInterface/Views/Main.css:
+        (body.docked.bottom):
+        * UserInterface/Views/Toolbar.css:
+        (.toolbar):
+        (body.mac-platform:not(.legacy, .docked) .toolbar):
+        (.toolbar .control-section):
+        (.toolbar .item-section):
+        (.toolbar .item-section.left):
+        (.toolbar .item-section.center-left):
+        (.toolbar .item-section.center-right):
+        (.toolbar .item-section.right):
+        * UserInterface/Views/Toolbar.js:
+        (WebInspector.Toolbar):
+        (WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
+        (WebInspector.Toolbar.prototype.customUpdateLayout):
+        (WebInspector.Toolbar.prototype.addToolbarItem):
+
+2015-04-25  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Add NavigationBar to the details sidebar
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=144191
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseImageUtilitiesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/ImageUtilities.js (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/ImageUtilities.js        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/ImageUtilities.js        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Use as a default where an image version is not otherwise specified.
</span><span class="cx"> // Bump the base version when making changes that affect the result image.
</span><del>-const baseDefaultImageVersion = 5;
</del><ins>+const baseDefaultImageVersion = 6;
</ins><span class="cx"> const defaultImageVersion = baseDefaultImageVersion + 0.01 * WebInspector.Platform.version.base + 0.0001 * WebInspector.Platform.version.release;
</span><span class="cx"> 
</span><span class="cx"> try {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -137,20 +137,9 @@
</span><span class="cx">     document.addEventListener(&quot;DOMContentLoaded&quot;, this.contentLoaded.bind(this));
</span><span class="cx"> 
</span><span class="cx">     // Create settings.
</span><del>-    this._toolbarDockedRightDisplayModeSetting = new WebInspector.Setting(&quot;toolbar-docked-right-display-mode&quot;, WebInspector.Toolbar.DisplayMode.IconAndLabelVertical);
-    this._toolbarDockedRightSizeModeSetting = new WebInspector.Setting(&quot;toolbar-docked-right-size-mode&quot;,WebInspector.Toolbar.SizeMode.Normal);
-
-    this._toolbarDockedBottomDisplayModeSetting = new WebInspector.Setting(&quot;toolbar-docked-display-mode&quot;, WebInspector.Toolbar.DisplayMode.IconAndLabelHorizontal);
-    this._toolbarDockedBottomSizeModeSetting = new WebInspector.Setting(&quot;toolbar-docked-size-mode&quot;,WebInspector.Toolbar.SizeMode.Small);
-
-    this._toolbarUndockedDisplayModeSetting = new WebInspector.Setting(&quot;toolbar-undocked-display-mode&quot;, WebInspector.Toolbar.DisplayMode.IconAndLabelVertical);
-    this._toolbarUndockedSizeModeSetting = new WebInspector.Setting(&quot;toolbar-undocked-size-mode&quot;,WebInspector.Toolbar.SizeMode.Normal);
-
</del><span class="cx">     this._showingSplitConsoleSetting = new WebInspector.Setting(&quot;showing-split-console&quot;, false);
</span><span class="cx">     this._splitConsoleHeightSetting = new WebInspector.Setting(&quot;split-console-height&quot;, 150);
</span><span class="cx"> 
</span><del>-    this._dockButtonToggledSetting = new WebInspector.Setting(&quot;dock-button-toggled&quot;, false);
-
</del><span class="cx">     this._openTabsSetting = new WebInspector.Setting(&quot;open-tabs&quot;, [&quot;elements&quot;, &quot;resources&quot;, &quot;timeline&quot;, &quot;debugger&quot;, &quot;console&quot;]);
</span><span class="cx">     this._selectedTabIndexSetting = new WebInspector.Setting(&quot;selected-tab-index&quot;, 0);
</span><span class="cx"> 
</span><span class="lines">@@ -203,9 +192,9 @@
</span><span class="cx">     document.body.classList.add(this.debuggableType);
</span><span class="cx"> 
</span><span class="cx">     // Create the user interface elements.
</span><del>-    this.toolbar = new WebInspector.Toolbar(document.getElementById(&quot;toolbar&quot;));
-    this.toolbar.addEventListener(WebInspector.Toolbar.Event.DisplayModeDidChange, this._toolbarDisplayModeDidChange, this);
-    this.toolbar.addEventListener(WebInspector.Toolbar.Event.SizeModeDidChange, this._toolbarSizeModeDidChange, this);
</del><ins>+    this.toolbar = new WebInspector.Toolbar(document.getElementById(&quot;toolbar&quot;), null, true);
+    this.toolbar.displayMode = WebInspector.Toolbar.DisplayMode.IconOnly;
+    this.toolbar.sizeMode = WebInspector.Toolbar.SizeMode.Small;
</ins><span class="cx"> 
</span><span class="cx">     this.tabBar = new WebInspector.TabBar(document.getElementById(&quot;tab-bar&quot;));
</span><span class="cx"> 
</span><span class="lines">@@ -259,20 +248,57 @@
</span><span class="cx">     this.stepIntoAlternateKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Semicolon, this.debuggerStepInto.bind(this));
</span><span class="cx">     this.stepOutAlternateKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, WebInspector.KeyboardShortcut.Key.Semicolon, this.debuggerStepOut.bind(this));
</span><span class="cx"> 
</span><del>-    this.undockButtonNavigationItem = new WebInspector.ToggleControlToolbarItem(&quot;undock&quot;, WebInspector.UIString(&quot;Detach into separate window&quot;), &quot;&quot;, platformImagePath(&quot;Undock.svg&quot;), &quot;&quot;, 16, 14);
-    this.undockButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._undock, this);
</del><ins>+    this._closeToolbarButton = new WebInspector.ControlToolbarItem(&quot;dock-close&quot;, WebInspector.UIString(&quot;Close&quot;), platformImagePath(&quot;Close.svg&quot;), 16, 14);
+    this._closeToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this.close, this);
</ins><span class="cx"> 
</span><del>-    this.closeButtonNavigationItem = new WebInspector.ControlToolbarItem(&quot;dock-close&quot;, WebInspector.UIString(&quot;Close&quot;), platformImagePath(&quot;Close.svg&quot;), 16, 14);
-    this.closeButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this.close, this);
</del><ins>+    this._undockToolbarButton = new WebInspector.ButtonToolbarItem(&quot;undock&quot;, WebInspector.UIString(&quot;Detach into separate window&quot;), null, &quot;Images/Undock.svg&quot;);
+    this._undockToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._undock, this);
</ins><span class="cx"> 
</span><del>-    this.toolbar.addToolbarItem(this.closeButtonNavigationItem, WebInspector.Toolbar.Section.Control);
-    this.toolbar.addToolbarItem(this.undockButtonNavigationItem, WebInspector.Toolbar.Section.Control);
</del><ins>+    this._dockRightToolbarButton = new WebInspector.ButtonToolbarItem(&quot;dock-right&quot;, WebInspector.UIString(&quot;Dock to right of window&quot;), null, &quot;Images/DockRight.svg&quot;);
+    this._dockRightToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._dockRight, this);
</ins><span class="cx"> 
</span><del>-    this.dashboardContainer = new WebInspector.DashboardContainerView;
-    this.dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.default);
</del><ins>+    this._dockBottomToolbarButton = new WebInspector.ButtonToolbarItem(&quot;dock-bottom&quot;, WebInspector.UIString(&quot;Dock to bottom of window&quot;), null, &quot;Images/DockBottom.svg&quot;);
+    this._dockBottomToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._dockBottom, this);
</ins><span class="cx"> 
</span><del>-    this.toolbar.addToolbarItem(this.dashboardContainer.toolbarItem, WebInspector.Toolbar.Section.Center);
</del><ins>+    var toolTip;
+    if (WebInspector.debuggableType === WebInspector.DebuggableType.JavaScript)
+        toolTip = WebInspector.UIString(&quot;Restart (%s)&quot;).format(this._reloadPageKeyboardShortcut.displayName);
+    else
+        toolTip = WebInspector.UIString(&quot;Reload page (%s)\nReload ignoring cache (%s)&quot;).format(this._reloadPageKeyboardShortcut.displayName, this._reloadPageIgnoringCacheKeyboardShortcut.displayName);
</ins><span class="cx"> 
</span><ins>+    this._reloadToolbarButton = new WebInspector.ButtonToolbarItem(&quot;reload&quot;, toolTip, null, &quot;Images/ReloadToolbar.svg&quot;);
+    this._reloadToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._reloadPageClicked, this);
+
+    this._downloadToolbarButton = new WebInspector.ButtonToolbarItem(&quot;download&quot;, WebInspector.UIString(&quot;Download Web Archive&quot;), null, &quot;Images/DownloadArrow.svg&quot;);
+    this._downloadToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._downloadWebArchive, this);
+
+    this._updateDownloadToolbarButton();
+
+    // The toolbar button for node inspection.
+    if (this.debuggableType === WebInspector.DebuggableType.Web) {
+        var toolTip = WebInspector.UIString(&quot;Enable point to inspect mode (%s)&quot;).format(WebInspector._inspectModeKeyboardShortcut.displayName);
+        var activatedToolTip = WebInspector.UIString(&quot;Disable point to inspect mode (%s)&quot;).format(WebInspector._inspectModeKeyboardShortcut.displayName);
+        this._inspectModeToolbarButton = new WebInspector.ActivateButtonToolbarItem(&quot;inspect&quot;, toolTip, activatedToolTip, null, &quot;Images/Crosshair.svg&quot;);
+        this._inspectModeToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._toggleInspectMode, this);
+    }
+
+    this._dashboardContainer = new WebInspector.DashboardContainerView;
+    this._dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.default);
+
+    this.toolbar.addToolbarItem(this._closeToolbarButton, WebInspector.Toolbar.Section.Control);
+
+    this.toolbar.addToolbarItem(this._undockToolbarButton, WebInspector.Toolbar.Section.Left);
+    this.toolbar.addToolbarItem(this._dockRightToolbarButton, WebInspector.Toolbar.Section.Left);
+    this.toolbar.addToolbarItem(this._dockBottomToolbarButton, WebInspector.Toolbar.Section.Left);
+
+    this.toolbar.addToolbarItem(this._reloadToolbarButton, WebInspector.Toolbar.Section.CenterLeft);
+    this.toolbar.addToolbarItem(this._downloadToolbarButton, WebInspector.Toolbar.Section.CenterLeft);
+
+    this.toolbar.addToolbarItem(this._dashboardContainer.toolbarItem, WebInspector.Toolbar.Section.Center);
+
+    if (this._inspectModeToolbarButton)
+        this.toolbar.addToolbarItem(this._inspectModeToolbarButton, WebInspector.Toolbar.Section.CenterRight);
+
</ins><span class="cx">     this.resourceDetailsSidebarPanel = new WebInspector.ResourceDetailsSidebarPanel;
</span><span class="cx">     this.domNodeDetailsSidebarPanel = new WebInspector.DOMNodeDetailsSidebarPanel;
</span><span class="cx">     this.cssStyleDetailsSidebarPanel = new WebInspector.CSSStyleDetailsSidebarPanel;
</span><span class="lines">@@ -427,26 +453,15 @@
</span><span class="cx">     if (side === &quot;bottom&quot;) {
</span><span class="cx">         document.body.classList.add(&quot;docked&quot;, &quot;bottom&quot;);
</span><span class="cx">         document.body.classList.remove(&quot;window-inactive&quot;, &quot;right&quot;);
</span><del>-
-        this.toolbar.displayMode = this._toolbarDockedBottomDisplayModeSetting.value;
-        this.toolbar.sizeMode = this._toolbarDockedBottomSizeModeSetting.value;
</del><span class="cx">     } else if (side === &quot;right&quot;) {
</span><span class="cx">         document.body.classList.add(&quot;docked&quot;, &quot;right&quot;);
</span><span class="cx">         document.body.classList.remove(&quot;window-inactive&quot;, &quot;bottom&quot;);
</span><del>-
-        this.toolbar.displayMode = this._toolbarDockedRightDisplayModeSetting.value;
-        this.toolbar.sizeMode = this._toolbarDockedRightSizeModeSetting.value;
-    } else {
</del><ins>+    } else
</ins><span class="cx">         document.body.classList.remove(&quot;docked&quot;, &quot;right&quot;, &quot;bottom&quot;);
</span><span class="cx"> 
</span><del>-        this.toolbar.displayMode = this._toolbarUndockedDisplayModeSetting.value;
-        this.toolbar.sizeMode = this._toolbarUndockedSizeModeSetting.value;
-    }
-
</del><span class="cx">     this._ignoreToolbarModeDidChangeEvents = false;
</span><span class="cx"> 
</span><span class="cx">     this._updateDockNavigationItems();
</span><del>-    this._updateToolbarHeight();
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.handlePossibleLinkClick = function(event, frame, alwaysOpenExternally)
</span><span class="lines">@@ -906,21 +921,21 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector._captureDidStart = function(event)
</span><span class="cx"> {
</span><del>-    this.dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.replay);
</del><ins>+    this._dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.replay);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._debuggerDidPause = function(event)
</span><span class="cx"> {
</span><span class="cx">     this.showDebuggerTab();
</span><span class="cx"> 
</span><del>-    this.dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.debugger);
</del><ins>+    this._dashboardContainer.showDashboardViewForRepresentedObject(this.dashboardManager.dashboards.debugger);
</ins><span class="cx"> 
</span><span class="cx">     InspectorFrontendHost.bringToFront();
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._debuggerDidResume = function(event)
</span><span class="cx"> {
</span><del>-    this.dashboardContainer.closeDashboardViewForRepresentedObject(this.dashboardManager.dashboards.debugger);
</del><ins>+    this._dashboardContainer.closeDashboardViewForRepresentedObject(this.dashboardManager.dashboards.debugger);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._frameWasAdded = function(event)
</span><span class="lines">@@ -937,6 +952,8 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector._mainFrameDidChange = function(event)
</span><span class="cx"> {
</span><ins>+    this._updateDownloadToolbarButton();
+
</ins><span class="cx">     this.updateWindowTitle();
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -947,6 +964,8 @@
</span><span class="cx"> 
</span><span class="cx">     this._inProvisionalLoad = false;
</span><span class="cx"> 
</span><ins>+    this._updateDownloadToolbarButton();
+
</ins><span class="cx">     this.updateWindowTitle();
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -995,17 +1014,11 @@
</span><span class="cx"> WebInspector._windowKeyDown = function(event)
</span><span class="cx"> {
</span><span class="cx">     this._updateModifierKeys(event);
</span><del>-
-    var opposite = !this._dockButtonToggledSetting.value;
-    this.undockButtonNavigationItem.toggled = (event.altKey &amp;&amp; !event.metaKey &amp;&amp; !event.shiftKey) ? opposite : !opposite;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._windowKeyUp = function(event)
</span><span class="cx"> {
</span><span class="cx">     this._updateModifierKeys(event);
</span><del>-
-    var opposite = !this._dockButtonToggledSetting.value;
-    this.undockButtonNavigationItem.toggled = (event.altKey &amp;&amp; !event.metaKey &amp;&amp; !event.shiftKey) ? opposite : !opposite;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._mouseMoved = function(event)
</span><span class="lines">@@ -1019,31 +1032,30 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector._pageHidden = function(event)
</span><span class="cx"> {
</span><ins>+    // FIXME: Save inspector state.
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._undock = function(event)
</span><span class="cx"> {
</span><del>-    this._dockButtonToggledSetting.value = this.undockButtonNavigationItem.toggled;
</del><ins>+    InspectorFrontendHost.requestSetDockSide(&quot;undocked&quot;);
+};
</ins><span class="cx"> 
</span><del>-    if (this.undockButtonNavigationItem.toggled)
-        InspectorFrontendHost.requestSetDockSide(this._dockSide === &quot;bottom&quot; ? &quot;right&quot; : &quot;bottom&quot;);
-    else
-        InspectorFrontendHost.requestSetDockSide(&quot;undocked&quot;);
</del><ins>+WebInspector._dockBottom = function(event)
+{
+    InspectorFrontendHost.requestSetDockSide(&quot;bottom&quot;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._dockRight = function(event)
+{
+    InspectorFrontendHost.requestSetDockSide(&quot;right&quot;);
+};
+
</ins><span class="cx"> WebInspector._updateDockNavigationItems = function()
</span><span class="cx"> {
</span><del>-    // The close and undock buttons are only available when docked.
-    var docked = this.docked;
-    this.closeButtonNavigationItem.hidden = !docked;
-    this.undockButtonNavigationItem.hidden = !docked;
-
-    if (docked) {
-        this.undockButtonNavigationItem.alternateImage = this._dockSide === &quot;bottom&quot; ? platformImagePath(&quot;DockRight.svg&quot;) : platformImagePath(&quot;DockBottom.svg&quot;);
-        this.undockButtonNavigationItem.alternateToolTip = this._dockSide === &quot;bottom&quot; ? WebInspector.UIString(&quot;Dock to right of window&quot;) : WebInspector.UIString(&quot;Dock to bottom of window&quot;);
-    }
-
-    this.undockButtonNavigationItem.toggled = this._dockButtonToggledSetting.value;
</del><ins>+    this._closeToolbarButton.hidden = !this.docked;
+    this._undockToolbarButton.hidden = this._dockSide === &quot;undocked&quot;;
+    this._dockBottomToolbarButton.hidden = this._dockSide === &quot;bottom&quot;;
+    this._dockRightToolbarButton.hidden = this._dockSide === &quot;right&quot;;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._tabBrowserSizeDidChange = function()
</span><span class="lines">@@ -1069,36 +1081,6 @@
</span><span class="cx">         InspectorFrontendHost.setToolbarHeight(this.toolbar.element.offsetHeight);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-WebInspector._toolbarDisplayModeDidChange = function(event)
-{
-    if (this._ignoreToolbarModeDidChangeEvents)
-        return;
-
-    if (this._dockSide === &quot;bottom&quot;)
-        this._toolbarDockedBottomDisplayModeSetting.value = this.toolbar.displayMode;
-    else if (this._dockSide === &quot;right&quot;)
-        this._toolbarDockedRightDisplayModeSetting.value = this.toolbar.displayMode;
-    else
-        this._toolbarUndockedDisplayModeSetting.value = this.toolbar.displayMode;
-
-    this._updateToolbarHeight();
-};
-
-WebInspector._toolbarSizeModeDidChange = function(event)
-{
-    if (this._ignoreToolbarModeDidChangeEvents)
-        return;
-
-    if (this._dockSide === &quot;bottom&quot;)
-        this._toolbarDockedBottomSizeModeSetting.value = this.toolbar.sizeMode;
-    else if (this._dockSide === &quot;right&quot;)
-        this._toolbarDockedRightSizeModeSetting.value = this.toolbar.sizeMode;
-    else
-        this._toolbarUndockedSizeModeSetting.value = this.toolbar.sizeMode;
-
-    this._updateToolbarHeight();
-};
-
</del><span class="cx"> WebInspector._tabBrowserSelectedTabContentViewDidChange = function(event)
</span><span class="cx"> {
</span><span class="cx">     if (this.tabBar.selectedTabBarItem)
</span><span class="lines">@@ -1311,33 +1293,59 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector._domNodeWasInspected = function(event)
</span><span class="cx"> {
</span><del>-    WebInspector.domTreeManager.highlightDOMNodeForTwoSeconds(event.data.node.id);
</del><ins>+    this.domTreeManager.highlightDOMNodeForTwoSeconds(event.data.node.id);
</ins><span class="cx"> 
</span><span class="cx">     InspectorFrontendHost.bringToFront();
</span><span class="cx"> 
</span><del>-    this.showMainFrameDOMTree(event.data.node);
</del><ins>+    this.showMainFrameDOMTree(event.data.node, true);
</ins><span class="cx"> };
</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 = this.domTreeManager.inspectModeEnabled;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector._toggleInspectMode = function(event)
</span><span class="cx"> {
</span><del>-    WebInspector.domTreeManager.inspectModeEnabled = !WebInspector.domTreeManager.inspectModeEnabled;
</del><ins>+    this.domTreeManager.inspectModeEnabled = !this.domTreeManager.inspectModeEnabled;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._downloadWebArchive = function(event)
+{
+    this.archiveMainFrame();
+};
+
</ins><span class="cx"> WebInspector._reloadPage = function(event)
</span><span class="cx"> {
</span><span class="cx">     PageAgent.reload();
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._reloadPageClicked = function(event)
+{
+    // Ignore cache when the shift key is pressed.
+    PageAgent.reload(window.event ? window.event.shiftKey : false);
+};
+
</ins><span class="cx"> WebInspector._reloadPageIgnoringCache = function(event)
</span><span class="cx"> {
</span><span class="cx">     PageAgent.reload(true);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector._updateDownloadToolbarButton = function()
+{
+    if (!PageAgent.archive || this.debuggableType !== WebInspector.DebuggableType.Web) {
+        this._downloadToolbarButton.hidden = true;
+        return;
+    }
+
+    if (this._downloadingPage) {
+        this._downloadToolbarButton.enabled = false;
+        return;
+    }
+
+    this._downloadToolbarButton.enabled = this.canArchiveMainFrame();
+};
+
</ins><span class="cx"> WebInspector._toggleInspectMode = function(event)
</span><span class="cx"> {
</span><span class="cx">     this.domTreeManager.inspectModeEnabled = !this.domTreeManager.inspectModeEnabled;
</span><span class="lines">@@ -1770,16 +1778,20 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.archiveMainFrame = function()
</span><span class="cx"> {
</span><del>-    this.notifications.dispatchEventToListeners(WebInspector.Notification.PageArchiveStarted, event);
</del><ins>+    this._downloadingPage = true;
+    this._updateDownloadToolbarButton();
</ins><span class="cx"> 
</span><span class="cx">     PageAgent.archive(function(error, data) {
</span><del>-        this.notifications.dispatchEventToListeners(WebInspector.Notification.PageArchiveEnded, event);
</del><ins>+        this._downloadingPage = false;
+        this._updateDownloadToolbarButton();
+
</ins><span class="cx">         if (error)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         var mainFrame = WebInspector.frameResourceManager.mainFrame;
</span><span class="cx">         var archiveName = mainFrame.mainResource.urlComponents.host || mainFrame.mainResource.displayName || &quot;Archive&quot;;
</span><span class="cx">         var url = &quot;web-inspector:///&quot; + encodeURI(archiveName) + &quot;.webarchive&quot;;
</span><ins>+
</ins><span class="cx">         InspectorFrontendHost.save(url, data, true, true);
</span><span class="cx">     }.bind(this));
</span><span class="cx"> };
</span><span class="lines">@@ -1789,6 +1801,9 @@
</span><span class="cx">     if (!PageAgent.archive || this.debuggableType !== WebInspector.DebuggableType.Web)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (!WebInspector.frameResourceManager.mainFrame || !WebInspector.frameResourceManager.mainFrame.mainResource)
+        return;
+
</ins><span class="cx">     return WebInspector.Resource.typeFromMIMEType(WebInspector.frameResourceManager.mainFrame.mainResource.mimeType) === WebInspector.Resource.Type.Document;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesCrosshairsvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/Crosshair.svg (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Crosshair.svg        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Crosshair.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><del>-&lt;!-- Copyright © 2013 Apple Inc. All rights reserved. --&gt;
-&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 16 16&quot;&gt;
-    &lt;path d=&quot;M 9 11.875 C 10.40625 11.511719 11.511719 10.40625 11.875 9 L 9.734375 9 C 9.902344 8.707031 10 8.363281 10 8 C 10 7.636719 9.902344 7.292969 9.734375 7 L 11.875 7 C 11.511719 5.59375 10.40625 4.488281 9 4.125 L 9 6.265625 C 8.707031 6.097656 8.363281 6 8 6 C 7.636719 6 7.292969 6.097656 7 6.265625 L 7 4.125 C 5.59375 4.488281 4.488281 5.59375 4.125 7 L 6.265625 7 C 6.097656 7.292969 6 7.636719 6 8 C 6 8.363281 6.097656 8.707031 6.265625 9 L 4.125 9 C 4.488281 10.40625 5.59375 11.511719 7 11.875 L 7 9.734375 C 7.292969 9.902344 7.636719 10 8 10 C 8.363281 10 8.707031 9.902344 9 9.734375 Z M 7 13.410156 C 4.765625 13 3 11.234375 2.589844 9 L 1 9 L 1 7 L 2.589844 7 C 3 4.765625 4.765625 3 7 2.589844 L 7 1 L 9 1 L 9 2.589844 C 11.234375 3 13 4.765625 13.410156 7 L 15 7 L 15 9 L 13.410156 9 C 13 11.234375 11.234375 13 9 13.410156 L 9 15 L 7 15 Z&quot;/&gt;
</del><ins>+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;circle class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; cx=&quot;8&quot; cy=&quot;8&quot; r=&quot;6&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 8 0 L 8 6.5&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 0 8 L 6.5 8&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 8 9.5 L 8 16&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 9.5 8 L 16 8&quot;/&gt;
</ins><span class="cx"> &lt;/svg&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesDockBottomsvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/DockBottom.svg (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/DockBottom.svg        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/DockBottom.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><del>-&lt;!-- Copyright © 2014 Apple Inc. All rights reserved. --&gt;
-&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 16 14&quot;&gt;
-    &lt;rect fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;1.5&quot; y=&quot;2.5&quot; width=&quot;10&quot; height=&quot;10&quot; rx=&quot;1&quot;/&gt;
-    &lt;rect fill=&quot;black&quot; x=&quot;3&quot; y=&quot;8&quot; width=&quot;7&quot; height=&quot;3&quot;/&gt;
</del><ins>+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;rect class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;0.5&quot; y=&quot;1.5&quot; width=&quot;15&quot; height=&quot;13&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 1 9.5 L 15 9.5 L 1 9.5 Z&quot;/&gt;
</ins><span class="cx"> &lt;/svg&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesDockRightsvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/DockRight.svg (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/DockRight.svg        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/DockRight.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><del>-&lt;!-- Copyright © 2014 Apple Inc. All rights reserved. --&gt;
-&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 16 14&quot;&gt;
-    &lt;rect fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;1.5&quot; y=&quot;2.5&quot; width=&quot;10&quot; height=&quot;10&quot; rx=&quot;1&quot;/&gt;
-    &lt;rect fill=&quot;black&quot; x=&quot;7&quot; y=&quot;4&quot; width=&quot;3&quot; height=&quot;7&quot;/&gt;
</del><ins>+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;rect class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;0.5&quot; y=&quot;1.5&quot; width=&quot;15&quot; height=&quot;13&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 9.5 2 L 9.5 14 L 9.5 2 Z&quot;/&gt;
</ins><span class="cx"> &lt;/svg&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesDownloadArrowsvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/DownloadArrow.svg (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/DownloadArrow.svg        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/DownloadArrow.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,10 +1,7 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><del>-&lt;!-- Copyright © 2014 Apple Inc. All rights reserved. --&gt;
-&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 16 16&quot;&gt;
-    &lt;g fill=&quot;none&quot; stroke-linecap=&quot;square&quot; stroke=&quot;black&quot;&gt;
-        &lt;circle class=&quot;stroked&quot; cx=&quot;7.5&quot; cy=&quot;8.5&quot; r=&quot;6&quot;/&gt;
-        &lt;path class=&quot;stroked&quot; d=&quot;M 10.5 8.5 L 7.5 11.5&quot;/&gt;
-        &lt;path class=&quot;stroked&quot; d=&quot;M 4.5 8.5 L 7.5 11.5&quot;/&gt;
-        &lt;path class=&quot;stroked&quot; d=&quot;M 7.5 3 L 7.5 10.5&quot;/&gt;
-    &lt;/g&gt;
</del><ins>+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 8.5 15 C 12.3659934 15 15.5 11.8659934 15.5 8 C 15.5 4.13400656 12.3659934 1 8.5 1 C 4.63400656 1 1.5 4.13400656 1.5 8 C 1.5 11.8659934 4.63400656 15 8.5 15 Z&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 8.5 1.5 L 8.5 11&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 5 8 L 8.5 11.5 L 12 8&quot;/&gt;
</ins><span class="cx"> &lt;/svg&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesReloadToolbarsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/ReloadToolbar.svg (0 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/ReloadToolbar.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/ReloadToolbar.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;clipPath id=&quot;1&quot;&gt;
+        &lt;path d=&quot;M 6 16 L 0 16 L 0 2 L 7 2 L 7 9 L 14 9 L 14 16 L 6 16 Z&quot;/&gt;
+    &lt;/clipPath&gt;
+    &lt;path clip-path=&quot;url(#1)&quot; class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 7.5 15 C 10.8137087 15 13.5 12.3137087 13.5 9 C 13.5 5.68629134 10.8137087 3 7.5 3 C 4.18629134 3 1.5 5.68629134 1.5 9 C 1.5 12.3137087 4.18629134 15 7.5 15 Z&quot;/&gt;
+    &lt;path class=&quot;filled&quot; fill=&quot;black&quot; d=&quot;M 7 0 L 7 6.5 L 12.5 3.5 L 7 0 Z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesUndocksvg"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Images/Undock.svg (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/Undock.svg        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Undock.svg        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -1,9 +1,6 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><del>-&lt;!-- Copyright © 2014 Apple Inc. All rights reserved. --&gt;
-&lt;svg version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 16 14&quot;&gt;
-    &lt;clipPath id=&quot;1&quot;&gt;
-        &lt;path d=&quot;M 0 3.5 L 0 10 L 3 10 L 3 5 L 10 5 L 10 2 L 0 2 L 0 3.5 Z&quot;/&gt;
-    &lt;/clipPath&gt;
-    &lt;rect fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;4.5&quot; y=&quot;6.5&quot; width=&quot;9&quot; height=&quot;7&quot; rx=&quot;1&quot;/&gt;
-    &lt;rect fill=&quot;none&quot; stroke=&quot;black&quot; clip-path=&quot;url(#1)&quot; x=&quot;0.5&quot; y=&quot;2.5&quot; width=&quot;9&quot; height=&quot;7&quot; rx=&quot;1&quot;/&gt;
</del><ins>+&lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+&lt;svg viewBox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
+    &lt;rect class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; x=&quot;4.5&quot; y=&quot;5.5&quot; width=&quot;11&quot; height=&quot;9&quot;/&gt;
+    &lt;path class=&quot;stroked&quot; fill=&quot;none&quot; stroke=&quot;black&quot; d=&quot;M 3 10.5 L 0.5 10.5 L 0.5 1.5 L 11.5 1.5 L 11.5 4&quot;/&gt;
</ins><span class="cx"> &lt;/svg&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsActivateButtonToolbarItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonToolbarItem.js (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonToolbarItem.js        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonToolbarItem.js        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -27,13 +27,13 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.ActivateButtonNavigationItem.call(this, identifier, defaultToolTip, activatedToolTip, image, 32, 32, suppressEmboss, role);
</span><span class="cx"> 
</span><del>-    console.assert(label);
</del><ins>+    if (typeof label === &quot;string&quot;) {
+        this._labelElement = document.createElement(&quot;div&quot;);
+        this._labelElement.className = WebInspector.ButtonToolbarItem.LabelStyleClassName;
+        this._element.appendChild(this._labelElement);
</ins><span class="cx"> 
</span><del>-    this._labelElement = document.createElement(&quot;div&quot;);
-    this._labelElement.className = WebInspector.ButtonToolbarItem.LabelStyleClassName;
-    this._element.appendChild(this._labelElement);
-
-    this.label = label;
</del><ins>+        this.label = label;
+    }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.ActivateButtonToolbarItem.prototype = {
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     set label(newLabel)
</span><span class="cx">     {
</span><span class="cx">         console.assert(newLabel);
</span><del>-        if (!newLabel)
</del><ins>+        if (!newLabel || !this._labelElement)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         this._labelElement.textContent = newLabel;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsButtonToolbarItemcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.css (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.css        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.css        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -27,9 +27,25 @@
</span><span class="cx">     align-items: center;
</span><span class="cx">     justify-content: center;
</span><span class="cx"> 
</span><del>-    padding: 0 6px;
</del><ins>+    border-radius: 4px;
+    background-color: rgb(252, 252, 252);
+
+    border: 1px solid transparent;
+    border-top-color: white;
+
+    box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0;
+
+    margin: 4px;
+
+    padding: 0 10px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+body.window-inactive .toolbar .item.button {
+    border: 1px solid rgb(220, 220, 220);
+    background-color: rgb(246, 246, 246);
+    box-shadow: none;
+}
+
</ins><span class="cx"> .toolbar.icon-and-label-vertical .item.button {
</span><span class="cx">     flex-direction: column;
</span><span class="cx"> }
</span><span class="lines">@@ -49,8 +65,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .toolbar.small-size .item.button &gt; .glyph {
</span><del>-    width: 24px;
-    height: 24px;
</del><ins>+    width: 16px;
+    height: 16px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .toolbar.label-only .item.button &gt; .glyph {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsButtonToolbarItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.js (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.js        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.js        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -25,15 +25,15 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.ButtonToolbarItem = function(identifier, toolTip, label, image, suppressEmboss, role)
</span><span class="cx"> {
</span><del>-    WebInspector.ButtonNavigationItem.call(this, identifier, toolTip, image, 32, 32, suppressEmboss, role);
</del><ins>+    WebInspector.ButtonNavigationItem.call(this, identifier, toolTip, image, 16, 16, suppressEmboss, role);
</ins><span class="cx"> 
</span><del>-    console.assert(label);
</del><ins>+    if (typeof label === &quot;string&quot;) {
+        this._labelElement = document.createElement(&quot;div&quot;);
+        this._labelElement.className = WebInspector.ButtonToolbarItem.LabelStyleClassName;
+        this._element.appendChild(this._labelElement);
</ins><span class="cx"> 
</span><del>-    this._labelElement = document.createElement(&quot;div&quot;);
-    this._labelElement.className = WebInspector.ButtonToolbarItem.LabelStyleClassName;
-    this._element.appendChild(this._labelElement);
-
-    this.label = label;
</del><ins>+        this.label = label;
+    }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.ButtonToolbarItem.LabelStyleClassName = &quot;label&quot;;
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     set label(newLabel)
</span><span class="cx">     {
</span><span class="cx">         console.assert(newLabel);
</span><del>-        if (!newLabel)
</del><ins>+        if (!newLabel || !this._labelElement)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         this._labelElement.textContent = newLabel;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDashboardContainerViewcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DashboardContainerView.css        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx">     box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0;
</span><span class="cx"> 
</span><del>-    margin: 4px 10px;
</del><ins>+    margin: 4px;
</ins><span class="cx">     overflow: hidden;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsMaincss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Main.css (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Main.css        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> body.docked.bottom {
</span><del>-    border-top: 1px solid rgb(179, 179, 179);
</del><ins>+    border-top: 1px solid rgb(200, 200, 200);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> body.docked.right {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsToolbarcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -29,11 +29,14 @@
</span><span class="cx">     white-space: nowrap;
</span><span class="cx">     overflow: hidden;
</span><span class="cx"> 
</span><del>-    border-bottom: 1px solid rgb(179, 179, 179);
-    background-image: linear-gradient(to bottom, rgb(232, 232, 232), rgb(209, 209, 209));
</del><ins>+    background-image: linear-gradient(to bottom, rgb(237, 237, 237), rgb(222, 222, 222));
</ins><span class="cx">     box-shadow: inset rgba(255, 255, 255, 0.5) 0 1px 1px;
</span><span class="cx"> 
</span><span class="cx">     outline: none;
</span><ins>+
+    padding-top: 3px;
+    padding-bottom: 3px;
+    height: 36px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> body.window-inactive .toolbar {
</span><span class="lines">@@ -41,42 +44,8 @@
</span><span class="cx">     background-color: rgb(246, 246, 246);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.toolbar.icon-and-label-vertical {
-    height: 56px;
-}
-
-.toolbar.icon-and-label-vertical.small-size {
-    height: 48px;
-}
-
-.toolbar.icon-and-label-horizontal,
-.toolbar.icon-only {
-    height: 40px;
-}
-
-.toolbar.icon-and-label-horizontal.small-size,
-.toolbar.icon-only.small-size,
-.toolbar.label-only {
-    height: 32px;
-}
-
</del><span class="cx"> body.mac-platform:not(.legacy, .docked) .toolbar {
</span><del>-    padding-top: 22px;
-}
-
-body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical {
-    height: 78px;
-}
-
-body.mac-platform:not(.legacy, .docked) .toolbar.icon-and-label-vertical.small-size {
-    height: 70px;
-}
-
-body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal, .icon-only) {
-    height: 62px;
-}
-
-body.mac-platform:not(.legacy, .docked) .toolbar:matches(.icon-and-label-horizontal.small-size, .icon-only.small-size, .label-only) {
</del><ins>+    padding-top: 21px;
</ins><span class="cx">     height: 54px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -113,7 +82,7 @@
</span><span class="cx">     justify-content: center;
</span><span class="cx"> 
</span><span class="cx">     padding-left: 6px;
</span><del>-    padding-right: 6px;
</del><ins>+    padding-right: 2px;
</ins><span class="cx"> 
</span><span class="cx">     min-width: -webkit-min-content;
</span><span class="cx"> }
</span><span class="lines">@@ -124,27 +93,28 @@
</span><span class="cx"> 
</span><span class="cx"> .toolbar .item-section {
</span><span class="cx">     display: flex;
</span><ins>+    flex: 1;
</ins><span class="cx">     min-width: -webkit-min-content;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.toolbar .item-section:not(.center) {
-    flex: 1;
</del><ins>+.toolbar .item-section.left {
+    justify-content: flex-start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-.toolbar .item-section.left {
</del><ins>+.toolbar .item-section.center-left {
</ins><span class="cx">     justify-content: flex-start;
</span><del>-    margin-right: 12px;
</del><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.toolbar .item-section.center-right {
+    justify-content: flex-end;
+}
+
</ins><span class="cx"> .toolbar .item-section.center {
</span><del>-    flex: 2;
</del><span class="cx">     justify-content: center;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .toolbar .item-section.right {
</span><span class="cx">     justify-content: flex-end;
</span><del>-    margin-left: 12px;
-    margin-right: 12px;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .toolbar .item {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsToolbarjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.js (183337 => 183338)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.js        2015-04-26 01:24:40 UTC (rev 183337)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.js        2015-04-26 01:25:22 UTC (rev 183338)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-WebInspector.Toolbar = function(element, navigationItems) {
</del><ins>+WebInspector.Toolbar = function(element, navigationItems, dontAllowModeChanges) {
</ins><span class="cx">     WebInspector.NavigationBar.call(this, element, navigationItems, &quot;toolbar&quot;);
</span><span class="cx"> 
</span><span class="cx">     this.displayMode = WebInspector.Toolbar.DisplayMode.IconAndLabelVertical;
</span><span class="lines">@@ -35,19 +35,26 @@
</span><span class="cx"> 
</span><span class="cx">     this._leftSectionElement = document.createElement(&quot;div&quot;);
</span><span class="cx">     this._leftSectionElement.className = WebInspector.Toolbar.ItemSectionStyleClassName + &quot; &quot; + WebInspector.Toolbar.LeftItemSectionStyleClassName;
</span><del>-    this._leftSectionElement.setAttribute(&quot;role&quot;, &quot;tablist&quot;);
</del><span class="cx">     this._element.appendChild(this._leftSectionElement);
</span><span class="cx"> 
</span><ins>+    this._centerLeftSectionElement = document.createElement(&quot;div&quot;);
+    this._centerLeftSectionElement.className = WebInspector.Toolbar.ItemSectionStyleClassName + &quot; &quot; + WebInspector.Toolbar.CenterLeftItemSectionStyleClassName;
+    this._element.appendChild(this._centerLeftSectionElement);
+
</ins><span class="cx">     this._centerSectionElement = document.createElement(&quot;div&quot;);
</span><span class="cx">     this._centerSectionElement.className = WebInspector.Toolbar.ItemSectionStyleClassName + &quot; &quot; + WebInspector.Toolbar.CenterItemSectionStyleClassName;
</span><span class="cx">     this._element.appendChild(this._centerSectionElement);
</span><span class="cx"> 
</span><ins>+    this._centerRightSectionElement = document.createElement(&quot;div&quot;);
+    this._centerRightSectionElement.className = WebInspector.Toolbar.ItemSectionStyleClassName + &quot; &quot; + WebInspector.Toolbar.CenterRightItemSectionStyleClassName;
+    this._element.appendChild(this._centerRightSectionElement);
+
</ins><span class="cx">     this._rightSectionElement = document.createElement(&quot;div&quot;);
</span><span class="cx">     this._rightSectionElement.className = WebInspector.Toolbar.ItemSectionStyleClassName + &quot; &quot; + WebInspector.Toolbar.RightItemSectionStyleClassName;
</span><del>-    this._rightSectionElement.setAttribute(&quot;role&quot;, &quot;tablist&quot;);
</del><span class="cx">     this._element.appendChild(this._rightSectionElement);
</span><span class="cx"> 
</span><del>-    this._element.addEventListener(&quot;contextmenu&quot;, this._handleContextMenuEvent.bind(this), false);
</del><ins>+    if (!dontAllowModeChanges)
+        this._element.addEventListener(&quot;contextmenu&quot;, this._handleContextMenuEvent.bind(this), false);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Move to a WebInspector.Object subclass and we can remove this.
</span><span class="lines">@@ -57,9 +64,10 @@
</span><span class="cx"> WebInspector.Toolbar.ControlSectionStyleClassName = &quot;control-section&quot;;
</span><span class="cx"> WebInspector.Toolbar.ItemSectionStyleClassName = &quot;item-section&quot;;
</span><span class="cx"> WebInspector.Toolbar.LeftItemSectionStyleClassName = &quot;left&quot;;
</span><ins>+WebInspector.Toolbar.CenterLeftItemSectionStyleClassName = &quot;center-left&quot;;
</ins><span class="cx"> WebInspector.Toolbar.CenterItemSectionStyleClassName = &quot;center&quot;;
</span><ins>+WebInspector.Toolbar.CenterRightItemSectionStyleClassName = &quot;center-right&quot;;
</ins><span class="cx"> WebInspector.Toolbar.RightItemSectionStyleClassName = &quot;right&quot;;
</span><del>-WebInspector.Toolbar.TotalSectionMargins = 12 * 3;
</del><span class="cx"> 
</span><span class="cx"> WebInspector.Toolbar.Event = {
</span><span class="cx">     DisplayModeDidChange: &quot;toolbar-display-mode-did-change&quot;,
</span><span class="lines">@@ -69,7 +77,9 @@
</span><span class="cx"> WebInspector.Toolbar.Section = {
</span><span class="cx">     Control: &quot;control&quot;,
</span><span class="cx">     Left: &quot;left&quot;,
</span><ins>+    CenterLeft: &quot;center-left&quot;,
</ins><span class="cx">     Center: &quot;center&quot;,
</span><ins>+    CenterRight: &quot;center-right&quot;,
</ins><span class="cx">     Right: &quot;right&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -161,16 +171,15 @@
</span><span class="cx"> 
</span><span class="cx">         function isOverflowingToolbar()
</span><span class="cx">         {
</span><del>-            var controlSectionWidth = this._controlSectionElement.offsetWidth;
-            var leftSectionWidth = this._leftSectionElement.offsetWidth;
-            var rightSectionWidth = this._rightSectionElement.offsetWidth;
-            var centerSectionWidth = this._centerSectionElement.offsetWidth;
</del><ins>+            var controlSectionWidth = this._controlSectionElement.getBoundingClientRect().width;
+            var leftSectionWidth = this._leftSectionElement.getBoundingClientRect().width;
+            var centerLeftSectionWidth = this._centerLeftSectionElement.getBoundingClientRect().width;
+            var centerSectionWidth = this._centerSectionElement.getBoundingClientRect().width;
+            var centerRightSectionWidth = this._centerRightSectionElement.getBoundingClientRect().width;
+            var rightSectionWidth = this._rightSectionElement.getBoundingClientRect().width;
</ins><span class="cx"> 
</span><del>-            // Add one to the actual toolbar width to allow some slop. This wasn't needed when sub-pixel layout was on,
-            // but that was disabled in: http://webkit.org/b/149209
-            var toolbarWidth = this.element.offsetWidth + 1;
-
-            return controlSectionWidth + leftSectionWidth + centerSectionWidth + rightSectionWidth + WebInspector.Toolbar.TotalSectionMargins &gt; toolbarWidth;
</del><ins>+            var toolbarWidth = Math.round(this.element.getBoundingClientRect().width);
+            return Math.round(controlSectionWidth + leftSectionWidth + centerLeftSectionWidth + centerSectionWidth + centerRightSectionWidth + rightSectionWidth) &gt; toolbarWidth;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Only the horizontal display mode supports collapsing labels.
</span><span class="lines">@@ -199,11 +208,19 @@
</span><span class="cx">             sectionElement = this._leftSectionElement;
</span><span class="cx">             break;
</span><span class="cx"> 
</span><ins>+        case WebInspector.Toolbar.Section.CenterLeft:
+            sectionElement = this._centerLeftSectionElement;
+            break;
+
</ins><span class="cx">         default:
</span><span class="cx">         case WebInspector.Toolbar.Section.Center:
</span><span class="cx">             sectionElement = this._centerSectionElement;
</span><span class="cx">             break;
</span><span class="cx"> 
</span><ins>+        case WebInspector.Toolbar.Section.CenterRight:
+            sectionElement = this._centerRightSectionElement;
+            break;
+
</ins><span class="cx">         case WebInspector.Toolbar.Section.Right:
</span><span class="cx">             sectionElement = this._rightSectionElement;
</span><span class="cx">             break;
</span></span></pre>
</div>
</div>

</body>
</html>