Changeset 244268 in webkit
- Timestamp:
- Apr 15, 2019 10:27:27 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r244267 r244268 1 2019-04-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: sidebar panels shouldn't be added as subviews unless visible 4 https://bugs.webkit.org/show_bug.cgi?id=196888 5 <rdar://problem/49870659> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/Sidebar.js: 10 (WI.Sidebar.prototype.insertSidebarPanel): 11 (WI.Sidebar.prototype.removeSidebarPanel): 12 (WI.Sidebar.prototype.set selectedSidebarPanel): 13 1 14 2019-04-15 Devin Rousso <drousso@apple.com> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js
r237196 r244268 79 79 this._sidebarPanels.splice(index, 0, sidebarPanel); 80 80 81 let referenceView = this._sidebarPanels[index + 1] || null;82 this.insertSubviewBefore(sidebarPanel, referenceView);83 84 81 if (this._navigationBar) { 85 82 console.assert(sidebarPanel.navigationItem); … … 107 104 108 105 this._sidebarPanels.remove(sidebarPanel); 109 this.removeSubview(sidebarPanel);110 106 111 107 if (this._navigationBar) { … … 127 123 128 124 if (this._selectedSidebarPanel) { 129 if (this._selectedSidebarPanel.visible) { 130 this._selectedSidebarPanel.hidden(); 131 this._selectedSidebarPanel.visibilityDidChange(); 132 } 133 125 this._selectedSidebarPanel.hidden(); 126 this._selectedSidebarPanel.visibilityDidChange(); 134 127 this._selectedSidebarPanel.selected = false; 128 this.removeSubview(this._selectedSidebarPanel); 135 129 } 136 130 … … 141 135 142 136 if (this._selectedSidebarPanel) { 137 this.addSubview(this._selectedSidebarPanel); 143 138 this._selectedSidebarPanel.selected = true; 144 145 if (this._selectedSidebarPanel.visible) { 146 this._selectedSidebarPanel.shown(); 147 this._selectedSidebarPanel.visibilityDidChange(); 148 } 139 this._selectedSidebarPanel.shown(); 140 this._selectedSidebarPanel.visibilityDidChange(); 149 141 } 150 142
Note: See TracChangeset
for help on using the changeset viewer.