Changeset 195456 in webkit
- Timestamp:
- Jan 22, 2016 10:07:58 AM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r195454 r195456 1 2016-01-22 Devin Rousso <dcrousso+webkit@gmail.com> 2 3 Web Inspector: Sidebar's should remember their width's 4 https://bugs.webkit.org/show_bug.cgi?id=153007 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Views/CSSStyleDetailsSidebarPanel.js: 9 (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): 10 Now calls superclass function. 11 12 * UserInterface/Views/Sidebar.js: 13 (WebInspector.Sidebar.prototype.set selectedSidebarPanel): 14 Now calls _recalculateWidth with the saved width value of the sidebar as 15 the first parameter. 16 17 (WebInspector.Sidebar.prototype.set collapsed): 18 Now only calls _recalculateWidth if the selected sidebar panel is visible, 19 seeing as if it is hidden the width is irrelevant. 20 21 * UserInterface/Views/SidebarPanel.js: 22 (WebInspector.SidebarPanel): 23 Creates a setting object using the panel's identifier to store the current width. 24 25 (WebInspector.SidebarPanel.prototype.get savedWidth): 26 (WebInspector.SidebarPanel.prototype.widthDidChange): 27 So long as the current width has a value, save it to the setting object. 28 1 29 2016-01-22 Devin Rousso <dcrousso+webkit@gmail.com> 2 30 -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js
r195454 r195456 173 173 widthDidChange() 174 174 { 175 super.widthDidChange(); 176 175 177 this._updateNoForcedPseudoClassesScrollOffset(); 176 178 -
trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js
r194879 r195456 148 148 this._selectedSidebarPanel.shown(); 149 149 this._selectedSidebarPanel.visibilityDidChange(); 150 this._recalculateWidth( );150 this._recalculateWidth(this._selectedSidebarPanel.savedWidth); 151 151 } 152 152 } … … 201 201 202 202 if (this._selectedSidebarPanel) { 203 if (this._selectedSidebarPanel.visible) 203 if (this._selectedSidebarPanel.visible) { 204 204 this._selectedSidebarPanel.shown(); 205 else 205 this._recalculateWidth(this._selectedSidebarPanel.savedWidth); 206 } else 206 207 this._selectedSidebarPanel.hidden(); 207 208 208 209 this._selectedSidebarPanel.visibilityDidChange(); 209 this._selectedSidebarPanel.widthDidChange();210 this._recalculateWidth();211 210 } 212 211 -
trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js
r194879 r195456 34 34 this._selected = false; 35 35 36 this._widthSetting = new WebInspector.Setting(identifier + "-sidebar-panel-width", 0); 36 37 this._savedScrollPosition = 0; 37 38 … … 86 87 // Implemented by subclasses. 87 88 return 0; 89 } 90 91 get savedWidth() 92 { 93 return this._widthSetting.value; 88 94 } 89 95 … … 149 155 widthDidChange() 150 156 { 157 let width = this.element.realOffsetWidth; 158 if (width && width !== this._widthSetting.value) 159 this._widthSetting.value = width; 160 151 161 // Implemented by subclasses. 152 162 }
Note: See TracChangeset
for help on using the changeset viewer.