Changeset 240347 in webkit
- Timestamp:
- Jan 23, 2019 10:46:56 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r240323 r240347 1 2019-01-23 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Network Waterfall column should redraw when adding/removing new columns 4 https://bugs.webkit.org/show_bug.cgi?id=193696 5 <rdar://problem/47464149> 6 7 Reviewed by Devin Rousso. 8 9 * UserInterface/Views/TableColumn.js: 10 (WI.TableColumn.prototype.get needsReloadOnResize): 11 * UserInterface/Views/NetworkTableContentView.js: 12 (WI.NetworkTableContentView.prototype.initialLayout): 13 Mark the waterfall column as sensitive to any resizes. 14 15 * UserInterface/Views/Table.js: 16 (WI.Table.prototype.showColumn): 17 (WI.Table.prototype.hideColumn): 18 Update column widths and reload any columns that may be sensitive to resizes. 19 1 20 2019-01-22 Devin Rousso <drousso@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
r240173 r240347 1071 1071 minWidth: 230, 1072 1072 headerView: this._waterfallTimelineRuler, 1073 needsReloadOnResize: true, 1073 1074 }); 1074 1075 -
trunk/Source/WebInspectorUI/UserInterface/Views/Table.js
r240290 r240347 484 484 485 485 // Re-layout all columns to make space. 486 this._widthGeneration++; 486 487 this._columnWidths = null; 487 488 this._resizeColumnsAndFiller(); … … 490 491 for (let cell of cellsToPopulate) 491 492 this._delegate.tablePopulateCell(this, cell, column, cell.parentElement.__index); 493 494 // Now populate columns that may be sensitive to resizes. 495 for (let visibleColumn of this._visibleColumns) { 496 if (visibleColumn !== column) { 497 if (visibleColumn.needsReloadOnResize) 498 this.reloadVisibleColumnCells(visibleColumn); 499 } 500 } 492 501 } 493 502 … … 534 543 return; 535 544 536 this._columnWidths.splice(columnIndex, 1);537 538 545 for (let row of this._listElement.children) { 539 546 if (row !== this._fillerRow) … … 541 548 } 542 549 543 this.needsLayout(); 550 // Re-layout all columns to make space. 551 this._widthGeneration++; 552 this._columnWidths = null; 553 this._resizeColumnsAndFiller(); 554 555 // Now populate columns that may be sensitive to resizes. 556 for (let visibleColumn of this._visibleColumns) { 557 if (visibleColumn.needsReloadOnResize) 558 this.reloadVisibleColumnCells(visibleColumn); 559 } 544 560 } 545 561 -
trunk/Source/WebInspectorUI/UserInterface/Views/TableColumn.js
r223734 r240347 26 26 WI.TableColumn = class TableColumn extends WI.Object 27 27 { 28 constructor(identifier, name, {initialWidth, minWidth, maxWidth, hidden, sortable, hideable, align, resizeType, headerView } = {})28 constructor(identifier, name, {initialWidth, minWidth, maxWidth, hidden, sortable, hideable, align, resizeType, headerView, needsReloadOnResize} = {}) 29 29 { 30 30 super(); … … 50 50 this._resizeType = resizeType || TableColumn.ResizeType.Auto; 51 51 this._headerView = headerView || null; 52 this._needsReloadOnResize = needsReloadOnResize || false; 52 53 53 54 console.assert(!this._minWidth || !this._maxWidth || this._minWidth <= this._maxWidth, "Invalid min/max", this._minWidth, this._maxWidth); … … 68 69 get align() { return this._align; } 69 70 get headerView() { return this._headerView; } 71 get needsReloadOnResize() { return this._needsReloadOnResize; } 70 72 71 73 get locked() { return this._resizeType === TableColumn.ResizeType.Locked; }
Note: See TracChangeset
for help on using the changeset viewer.