Title: [217452] trunk/Source/WebInspectorUI
Revision
217452
Author
[email protected]
Date
2017-05-25 15:12:05 -0700 (Thu, 25 May 2017)

Log Message

Web Inspector: Changing the width of a Sidebar when it's collapsed shouldn't trigger a layout
https://bugs.webkit.org/show_bug.cgi?id=172606

Reviewed by Matt Baker.

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype._recalculateWidth):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (217451 => 217452)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-05-25 21:35:18 UTC (rev 217451)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-05-25 22:12:05 UTC (rev 217452)
@@ -1,3 +1,13 @@
+2017-05-25  Devin Rousso  <[email protected]>
+
+        Web Inspector: Changing the width of a Sidebar when it's collapsed shouldn't trigger a layout
+        https://bugs.webkit.org/show_bug.cgi?id=172606
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/Sidebar.js:
+        (WebInspector.Sidebar.prototype._recalculateWidth):
+
 2017-05-25  Fujii Hironori  <[email protected]>
 
         [GTK] Web Inspector: Add ListStylePositionInside.svg and ListStylePositionOutside.svg

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js (217451 => 217452)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js	2017-05-25 21:35:18 UTC (rev 217451)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js	2017-05-25 22:12:05 UTC (rev 217452)
@@ -286,10 +286,13 @@
         newWidth = Math.ceil(Number.constrain(newWidth, this.minimumWidth + 1, this.maximumWidth));
         this.element.style.width = `${newWidth}px`;
 
-        if (!this.collapsed && this._navigationBar)
+        if (this.collapsed)
+            return;
+
+        if (this._navigationBar)
             this._navigationBar.updateLayoutIfNeeded(WebInspector.View.LayoutReason.Resize);
 
-        if (!this.collapsed && this._selectedSidebarPanel)
+        if (this._selectedSidebarPanel)
             this._selectedSidebarPanel.updateLayoutIfNeeded(WebInspector.View.LayoutReason.Resize);
 
         this.dispatchEventToListeners(WebInspector.Sidebar.Event.WidthDidChange, {newWidth});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to