Changeset 244264 in webkit
- Timestamp:
- Apr 15, 2019 10:22:11 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r244199 r244264 1 2019-04-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first layout 4 https://bugs.webkit.org/show_bug.cgi?id=196901 5 <rdar://problem/49880539> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/View.js: 10 (WI.View.prototype._layoutSubtree): 11 Ensure that the forced override of the layout reason during the initial layout doesn't 12 affect subviews. 13 14 * UserInterface/Views/ConsoleDrawer.js: 15 (WI.ConsoleDrawer.prototype.sizeDidChange): Added. 16 (WI.ConsoleDrawer.prototype.layout): Deleted. 17 * UserInterface/Views/ConsolePrompt.js: 18 (WI.ConsolePrompt.prototype.sizeDidChange): Added. 19 (WI.ConsolePrompt.prototype.layout): Deleted. 20 * UserInterface/Views/DOMTreeContentView.js: 21 (WI.DOMTreeContentView.prototype.sizeDidChange): Added. 22 (WI.DOMTreeContentView.prototype.layout): 23 * UserInterface/Views/NavigationBar.js: 24 (WI.NavigationBar.prototype.sizeDidChange): Added. 25 (WI.NavigationBar.prototype.layout): 26 (WI.NavigationBar.prototype._updateContent): Added. 27 (WI.NavigationBar.prototype._updateContent.forceItemHidden): Added. 28 (WI.NavigationBar.prototype._updateContent.isDivider): Added. 29 (WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Added. 30 (WI.NavigationBar.prototype.layout.forceItemHidden): Deleted. 31 (WI.NavigationBar.prototype.layout.isDivider): Deleted. 32 (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Deleted. 33 * UserInterface/Views/TabBrowser.js: 34 (WI.TabBrowser.prototype.sizeDidChange): Added. 35 (WI.TabBrowser.prototype.layout): Deleted. 36 Move logic in `layout` to `sizeDidChange` where applicable. 37 1 38 2019-04-11 Devin Rousso <drousso@apple.com> 2 39 -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js
r231527 r244264 94 94 // Protected 95 95 96 layout()96 sizeDidChange() 97 97 { 98 super.sizeDidChange(); 99 98 100 if (this._collapsed) 99 101 return; 100 101 if (this.layoutReason !== WI.View.LayoutReason.Resize)102 return;103 104 super.layout();105 102 106 103 let height = this.height; -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js
r242118 r244264 145 145 } 146 146 147 layout() 148 { 149 if (this.layoutReason === WI.View.LayoutReason.Resize && this.text) 147 sizeDidChange() 148 { 149 super.sizeDidChange(); 150 151 if (this.text) 150 152 this._codeMirror.refresh(); 151 153 } -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js
r243207 r244264 365 365 // Protected 366 366 367 sizeDidChange() 368 { 369 super.sizeDidChange(); 370 371 this._domTreeOutline.selectDOMNode(this._domTreeOutline.selectedDOMNode()); 372 } 373 367 374 layout() 368 375 { 376 super.layout(); 377 369 378 this._domTreeOutline.updateSelectionArea(); 370 371 if (this.layoutReason === WI.View.LayoutReason.Resize)372 this._domTreeOutline.selectDOMNode(this._domTreeOutline.selectedDOMNode());373 379 } 374 380 -
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js
r243214 r244264 209 209 } 210 210 211 sizeDidChange() 212 { 213 super.sizeDidChange(); 214 215 this._updateContent(); 216 } 217 211 218 layout() 212 219 { 213 if (this.layoutReason !== WI.View.LayoutReason.Resize && !this._forceLayout) 214 return; 215 220 super.layout(); 221 222 if (!this._forceLayout) 223 return; 224 225 this._updateContent(); 226 } 227 228 // Private 229 230 _updateContent() 231 { 216 232 this._forceLayout = false; 217 233 … … 286 302 } 287 303 288 // Private289 290 304 _mouseDown(event) 291 305 { -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js
r242049 r244264 215 215 // Protected 216 216 217 layout() 218 { 219 if (this.layoutReason !== WI.View.LayoutReason.Resize) 220 return; 217 sizeDidChange() 218 { 219 super.sizeDidChange(); 221 220 222 221 for (let tabContentView of this._recentTabContentViews) -
trunk/Source/WebInspectorUI/UserInterface/Views/View.js
r244157 r244264 278 278 279 279 if (isInitialLayout) { 280 this.initialLayout(); 281 this._didInitialLayout = true; 282 } 283 284 if (this._layoutReason === WI.View.LayoutReason.Resize || isInitialLayout) 285 this.sizeDidChange(); 286 287 let savedLayoutReason = this._layoutReason; 288 if (isInitialLayout) { 280 289 // The initial layout should always be treated as dirty. 281 290 this._setLayoutReason(); 282 283 this.initialLayout(); 284 this._didInitialLayout = true; 285 } 286 287 if (this._layoutReason === WI.View.LayoutReason.Resize) 288 this.sizeDidChange(); 291 } 289 292 290 293 this.layout(); 294 295 // Ensure that the initial layout override doesn't affects to subviews. 296 this._layoutReason = savedLayoutReason; 291 297 292 298 if (WI.settings.enableLayoutFlashing.value)
Note: See TracChangeset
for help on using the changeset viewer.