Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first...
[WebKit-https.git] / Source / WebInspectorUI / UserInterface / Views / NavigationBar.js
index 144fe16..d91aa22 100644 (file)
@@ -208,11 +208,27 @@ WI.NavigationBar = class NavigationBar extends WI.View
         super.needsLayout();
     }
 
+    sizeDidChange()
+    {
+        super.sizeDidChange();
+
+        this._updateContent();
+    }
+
     layout()
     {
-        if (this.layoutReason !== WI.View.LayoutReason.Resize && !this._forceLayout)
+        super.layout();
+
+        if (!this._forceLayout)
             return;
 
+        this._updateContent();
+    }
+
+    // Private
+
+    _updateContent()
+    {
         this._forceLayout = false;
 
         // Remove the collapsed style class to test if the items can fit at full width.
@@ -285,8 +301,6 @@ WI.NavigationBar = class NavigationBar extends WI.View
             forceItemHidden(previousItem);
     }
 
-    // Private
-
     _mouseDown(event)
     {
         // Only handle left mouse clicks.