RESOLVED FIXED 172606
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
Summary Web Inspector: Changing the width of a Sidebar when it's collapsed shouldn't ...
Devin Rousso
Reported 2017-05-25 13:45:41 PDT
When changing tabs, the previously saved width's of the navigation and details sidebars are both applied to the sidebar elements, each of which triggers a layout of the main content. If the sidebar is collapsed, changing the width shouldn't trigger a layout as there is no change to what is displayed.
Attachments
Patch (1.28 KB, patch)
2017-05-25 13:47 PDT, Devin Rousso
no flags
[Image] Timeline Before (465.71 KB, image/png)
2017-05-25 13:47 PDT, Devin Rousso
no flags
[Image] Timeline After (470.06 KB, image/png)
2017-05-25 13:47 PDT, Devin Rousso
no flags
Patch (1.84 KB, patch)
2017-05-25 14:28 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2017-05-25 13:47:04 PDT
Devin Rousso
Comment 2 2017-05-25 13:47:23 PDT
Created attachment 311282 [details] [Image] Timeline Before
Devin Rousso
Comment 3 2017-05-25 13:47:37 PDT
Created attachment 311283 [details] [Image] Timeline After
Matt Baker
Comment 4 2017-05-25 14:10:09 PDT
Maybe Sidebar shouldn't dispatch the event at all when collapsed. That would make it easier for WidthDidChange listeners to always do the right thing, without needing to check if the sidebar is collapsed.
Joseph Pecoraro
Comment 5 2017-05-25 14:16:02 PDT
Comment on attachment 311281 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311281&action=review > Source/WebInspectorUI/UserInterface/Base/Main.js:1630 > WebInspector._sidebarWidthDidChange = function(event) > { > + if (event.target.collapsed) > + return; > + > this._tabBrowserSizeDidChange(); > }; This does not appear to be correct. When a tab is collapsed we want to run _tabBrowserSizeDidChange.
Devin Rousso
Comment 6 2017-05-25 14:28:01 PDT
Matt Baker
Comment 7 2017-05-25 14:33:36 PDT
Comment on attachment 311292 [details] Patch r=me
WebKit Commit Bot
Comment 8 2017-05-25 15:12:08 PDT
Comment on attachment 311292 [details] Patch Clearing flags on attachment: 311292 Committed r217452: <http://trac.webkit.org/changeset/217452>
WebKit Commit Bot
Comment 9 2017-05-25 15:12:09 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2017-05-30 20:21:28 PDT
Note You need to log in before you can comment on or make changes to this bug.