<!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>[194879] 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/194879">194879</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-11 17:40:24 -0800 (Mon, 11 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Storage tab navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=152473

Patch by Devin Rousso &lt;dcrousso+webkit@gmail.com&gt; on 2016-01-11
Reviewed by Timothy Hatcher.

The wrapping of the navigation bar on the Storage tab was caused by the
fact that Sidebar.js used a minimum width of 200px, regardless of the
content within the sidebar (unless it had a NavigationBar). Logic has
been added that causes the sidebar to use the selected panel's own
minimum width calculation if it is greater than 200px.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.get minimumWidth):

* UserInterface/Views/MultipleScopeBarItem.js:
(WebInspector.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
(WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
Sets the displayed text to the currently selected item.

(WebInspector.MultipleScopeBarItem.prototype.displayWidestItem):
Sets the displayed text to the widest (pixel wise) item in the select element.

* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
Now uses NavigationItem.prototype.get minimumWidth.

* UserInterface/Views/NavitationItem.js:
(WebInspector.NavitationItem.prototype.get minimumWidth):
Returns the element's realOffsetWidth.

* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel.prototype.get minimumWidth):

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.get minimumWidth):

* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar):
(WebInspector.ScopeBar.prototype.get minimumWidth):

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get minimumWidth):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):
(WebInspector.Sidebar.prototype._recalculateWidth):
Whenever the sidebar changes (e.g. tab change, sidebar becomes
visible/hidden, etc.), a width recalculation is necessary to ensure
that the navigation bar never wraps.

* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.get minimumWidth):

* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.get minimumWidth):

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsMultipleScopeBarItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNavigationBarjs">trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNavigationItemjs">trunk/Source/WebInspectorUI/UserInterface/Views/NavigationItem.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsResourceSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScopeBarjs">trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsSidebarjs">trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsStorageSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -1,5 +1,66 @@
</span><span class="cx"> 2016-01-11  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Storage tab navigation bar should fit on a single line
+        https://bugs.webkit.org/show_bug.cgi?id=152473
+
+        Reviewed by Timothy Hatcher.
+
+        The wrapping of the navigation bar on the Storage tab was caused by the
+        fact that Sidebar.js used a minimum width of 200px, regardless of the
+        content within the sidebar (unless it had a NavigationBar). Logic has
+        been added that causes the sidebar to use the selected panel's own
+        minimum width calculation if it is greater than 200px.
+
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WebInspector.DebuggerSidebarPanel.prototype.get minimumWidth):
+
+        * UserInterface/Views/MultipleScopeBarItem.js:
+        (WebInspector.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
+        (WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
+        Sets the displayed text to the currently selected item.
+
+        (WebInspector.MultipleScopeBarItem.prototype.displayWidestItem):
+        Sets the displayed text to the widest (pixel wise) item in the select element.
+
+        * UserInterface/Views/NavigationBar.js:
+        (WebInspector.NavigationBar.prototype._calculateMinimumWidth):
+        Now uses NavigationItem.prototype.get minimumWidth.
+
+        * UserInterface/Views/NavitationItem.js:
+        (WebInspector.NavitationItem.prototype.get minimumWidth):
+        Returns the element's realOffsetWidth.
+
+        * UserInterface/Views/NetworkSidebarPanel.js:
+        (WebInspector.NetworkSidebarPanel.prototype.get minimumWidth):
+
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype.get minimumWidth):
+
+        * UserInterface/Views/ScopeBar.js:
+        (WebInspector.ScopeBar):
+        (WebInspector.ScopeBar.prototype.get minimumWidth):
+
+        * UserInterface/Views/Sidebar.js:
+        (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
+        (WebInspector.Sidebar.prototype.get minimumWidth):
+        (WebInspector.Sidebar.prototype.set width):
+        (WebInspector.Sidebar.prototype.set collapsed):
+        (WebInspector.Sidebar.prototype._recalculateWidth):
+        Whenever the sidebar changes (e.g. tab change, sidebar becomes
+        visible/hidden, etc.), a width recalculation is necessary to ensure
+        that the navigation bar never wraps.
+
+        * UserInterface/Views/SidebarPanel.js:
+        (WebInspector.SidebarPanel.prototype.get minimumWidth):
+
+        * UserInterface/Views/StorageSidebarPanel.js:
+        (WebInspector.StorageSidebarPanel.prototype.get minimumWidth):
+
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        (WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):
+
+2016-01-11  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
+
</ins><span class="cx">         Web Inspector: Make Timelines view also remember sort order
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=152811
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -164,6 +164,11 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        return this._navigationBar.minimumWidth;
+    }
+
</ins><span class="cx">     closed()
</span><span class="cx">     {
</span><span class="cx">         super.closed();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsMultipleScopeBarItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">         this._selectElement.selectedIndex = this._scopeBarItems.indexOf(this._selectedScopeBarItem);
</span><span class="cx"> 
</span><span class="cx">         if (this._selectedScopeBarItem) {
</span><del>-            this._titleElement.textContent = this._selectedScopeBarItem.label;
</del><ins>+            this.displaySelectedItem();
</ins><span class="cx">             this._selectedScopeBarItem.selected = true;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -143,6 +143,25 @@
</span><span class="cx">         this._ignoreItemSelectedEvent = false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    displaySelectedItem()
+    {
+        this._titleElement.textContent = this._selectedScopeBarItem.label;
+    }
+
+    displayWidestItem()
+    {
+        let widestLabel = null;
+        let widestSize = 0;
+        for (let option of Array.from(this._selectElement.options)) {
+            this._titleElement.textContent = option.label;
+            if (this._titleElement.realOffsetWidth &gt; widestSize) {
+                widestSize = this._titleElement.realOffsetWidth;
+                widestLabel = option.label;
+            }
+        }
+        this._titleElement.textContent = widestLabel;
+    }
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _clicked(event)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNavigationBarjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -361,12 +361,13 @@
</span><span class="cx">         if (!wasCollapsed)
</span><span class="cx">             this.element.classList.add(WebInspector.NavigationBar.CollapsedStyleClassName);
</span><span class="cx"> 
</span><del>-        var totalItemWidth = 0;
-        for (var i = 0; i &lt; this._navigationItems.length; ++i) {
</del><ins>+        let totalItemWidth = 0;
+        for (let item of this._navigationItems) {
</ins><span class="cx">             // Skip flexible space items since they can take up no space at the minimum width.
</span><del>-            if (this._navigationItems[i] instanceof WebInspector.FlexibleSpaceNavigationItem)
</del><ins>+            if (item instanceof WebInspector.FlexibleSpaceNavigationItem)
</ins><span class="cx">                 continue;
</span><del>-            totalItemWidth += this._navigationItems[i].element.realOffsetWidth;
</del><ins>+
+            totalItemWidth += item.minimumWidth;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Remove the collapsed style class if we were not collapsed before.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNavigationItemjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationItem.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationItem.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationItem.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -60,6 +60,11 @@
</span><span class="cx">         return this._parentNavigationBar;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        return this._element.realOffsetWidth;
+    }
+
</ins><span class="cx">     updateLayout(expandOnly)
</span><span class="cx">     {
</span><span class="cx">         // Implemented by subclasses.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -71,6 +71,11 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        return this._navigationBar.minimumWidth;
+    }
+
</ins><span class="cx">     closed()
</span><span class="cx">     {
</span><span class="cx">         super.closed();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsResourceSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -75,6 +75,11 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        return this._navigationBar.minimumWidth;
+    }
+
</ins><span class="cx">     closed()
</span><span class="cx">     {
</span><span class="cx">         super.closed();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScopeBarjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -35,11 +35,35 @@
</span><span class="cx">         this._defaultItem = defaultItem;
</span><span class="cx">         this._shouldGroupNonExclusiveItems = shouldGroupNonExclusiveItems || false;
</span><span class="cx"> 
</span><ins>+        this._minimumWidth = 0;
+
</ins><span class="cx">         this._populate();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        if (!this._minimumWidth) {
+            // If a &quot;display: flex;&quot; element is too small for its contents and
+            // has &quot;flex-wrap: wrap;&quot; set as well, this will cause the contents
+            // to wrap (potentially overflowing), thus preventing a proper
+            // measurement of the width of the element. Removing the &quot;flex-wrap&quot;
+            // property will ensure that the contents are rendered on one line.
+            this.element.style.flexWrap = &quot;initial !important&quot;;
+
+            if (this._multipleItem)
+                this._multipleItem.displayWidestItem();
+
+            this._minimumWidth = this.element.realOffsetWidth;
+            this.element.style.flexWrap = null;
+
+            if (this._multipleItem)
+                this._multipleItem.displaySelectedItem();
+        }
+        return this._minimumWidth;
+    }
+
</ins><span class="cx">     get defaultItem()
</span><span class="cx">     {
</span><span class="cx">         return this._defaultItem;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsSidebarjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -147,6 +147,7 @@
</span><span class="cx">             if (this._selectedSidebarPanel.visible) {
</span><span class="cx">                 this._selectedSidebarPanel.shown();
</span><span class="cx">                 this._selectedSidebarPanel.visibilityDidChange();
</span><ins>+                this._recalculateWidth();
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -157,6 +158,8 @@
</span><span class="cx">     {
</span><span class="cx">         if (this._navigationBar)
</span><span class="cx">             return Math.max(WebInspector.Sidebar.AbsoluteMinimumWidth, this._navigationBar.minimumWidth);
</span><ins>+        if (this._selectedSidebarPanel)
+            return Math.max(WebInspector.Sidebar.AbsoluteMinimumWidth, this._selectedSidebarPanel.minimumWidth);
</ins><span class="cx">         return WebInspector.Sidebar.AbsoluteMinimumWidth;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -177,17 +180,7 @@
</span><span class="cx">         if (newWidth === this.width)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        newWidth = Math.max(this.minimumWidth, Math.min(newWidth, this.maximumWidth));
-
-        this.element.style.width = newWidth + &quot;px&quot;;
-
-        if (!this.collapsed &amp;&amp; this._navigationBar)
-            this._navigationBar.needsLayout();
-
-        if (!this.collapsed &amp;&amp; this._selectedSidebarPanel)
-            this._selectedSidebarPanel.widthDidChange();
-
-        this.dispatchEventToListeners(WebInspector.Sidebar.Event.WidthDidChange);
</del><ins>+        this._recalculateWidth(newWidth);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     get collapsed()
</span><span class="lines">@@ -213,8 +206,8 @@
</span><span class="cx">                 this._selectedSidebarPanel.hidden();
</span><span class="cx"> 
</span><span class="cx">             this._selectedSidebarPanel.visibilityDidChange();
</span><del>-
</del><span class="cx">             this._selectedSidebarPanel.widthDidChange();
</span><ins>+            this._recalculateWidth();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.Sidebar.Event.CollapsedStateDidChange);
</span><span class="lines">@@ -271,6 +264,21 @@
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="cx"> 
</span><ins>+    _recalculateWidth(newWidth = this.width)
+    {
+        // Need to add 1 because of the 1px border-right.
+        newWidth = Number.constrain(newWidth, this.minimumWidth + 1, this.maximumWidth);
+        this.element.style.width = Math.ceil(newWidth) + &quot;px&quot;;
+
+        if (!this.collapsed &amp;&amp; this._navigationBar)
+            this._navigationBar.needsLayout();
+
+        if (!this.collapsed &amp;&amp; this._selectedSidebarPanel)
+            this._selectedSidebarPanel.widthDidChange();
+
+        this.dispatchEventToListeners(WebInspector.Sidebar.Event.WidthDidChange);
+    }
+
</ins><span class="cx">     _navigationItemSelected(event)
</span><span class="cx">     {
</span><span class="cx">         this.selectedSidebarPanel = event.target.selectedNavigationItem ? event.target.selectedNavigationItem.identifier : null;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -81,6 +81,12 @@
</span><span class="cx">         return this.parentView;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        // Implemented by subclasses.
+        return 0;
+    }
+
</ins><span class="cx">     show()
</span><span class="cx">     {
</span><span class="cx">         if (!this.parentSidebar)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsStorageSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StorageSidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -106,6 +106,11 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        return this._navigationBar.minimumWidth;
+    }
+
</ins><span class="cx">     showDefaultContentView()
</span><span class="cx">     {
</span><span class="cx">         // Don't show anything by default. It doesn't make a whole lot of sense here.
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (194878 => 194879)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2016-01-12 01:34:59 UTC (rev 194878)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2016-01-12 01:40:24 UTC (rev 194879)
</span><span class="lines">@@ -218,6 +218,13 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get minimumWidth()
+    {
+        if (this._viewModeNavigationBar)
+            return Math.max(this._replayNavigationBar.minimumWidth, this._viewModeNavigationBar.minimumWidth);
+        return this._replayNavigationBar.minimumWidth;
+    }
+
</ins><span class="cx">     shown()
</span><span class="cx">     {
</span><span class="cx">         super.shown();
</span></span></pre>
</div>
</div>

</body>
</html>