REGRESSION (r221338): Web Inspector: NavigationBar incorrectly calculates minimumWidth
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 07:04:02 +0000 (07:04 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2017 07:04:02 +0000 (07:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179292

Reviewed by Devin Rousso.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype._calculateMinimumWidth):
totalItemWidth was the minimumWidth of the last item.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/NavigationBar.js

index cc5e099..a1831a0 100644 (file)
@@ -1,3 +1,14 @@
+2017-11-05  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        REGRESSION (r221338): Web Inspector: NavigationBar incorrectly calculates minimumWidth
+        https://bugs.webkit.org/show_bug.cgi?id=179292
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/NavigationBar.js:
+        (WI.NavigationBar.prototype._calculateMinimumWidth):
+        totalItemWidth was the minimumWidth of the last item.
+
 2017-11-05  Devin Rousso  <webkit@devinrousso.com>
 
         Web Inspector: Canvas Tab: selecting Frame tree element should update preview/slider, does nothing
index c61f033..2bccdfb 100644 (file)
@@ -427,7 +427,7 @@ WI.NavigationBar = class NavigationBar extends WI.View
         if (!wasCollapsed)
             this.element.classList.add(WI.NavigationBar.CollapsedStyleClassName);
 
-        let totalItemWidth = this._visibleNavigationItems.reduce((total, item) => item.minimumWidth, 0);
+        let totalItemWidth = this._visibleNavigationItems.reduce((total, item) => total + item.minimumWidth, 0);
 
         // Remove the collapsed style class if we were not collapsed before.
         if (!wasCollapsed)