WebKit Bugzilla
Attachment 359797 Details for
Bug 193696
: Web Inspector: Network Waterfall column should redraw when adding/removing new columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
reload-resize-1.patch (text/plain), 5.50 KB, created by
Joseph Pecoraro
on 2019-01-22 16:09:18 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-01-22 16:09:18 PST
Size:
5.50 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index f0c74bcbf86..9bbd96ea199 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-22 Joseph Pecoraro <pecoraro@apple.com> >+ >+ Web Inspector: Network Waterfall column should redraw when adding/removing new columns >+ https://bugs.webkit.org/show_bug.cgi?id=193696 >+ <rdar://problem/47464149> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/TableColumn.js: >+ (WI.TableColumn.prototype.get needsReloadOnResize): >+ * UserInterface/Views/NetworkTableContentView.js: >+ (WI.NetworkTableContentView.prototype.initialLayout): >+ Mark the waterfall column as sensitive to any resizes. >+ >+ * UserInterface/Views/Table.js: >+ (WI.Table.prototype.showColumn): >+ (WI.Table.prototype.hideColumn): >+ Update column widths and reload any columns that may be sensitive to resizes. >+ > 2019-01-22 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Network Table appears broken after filter - rows look collapsed >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >index 57ec8af3f10..d5cafd6b3cb 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >@@ -1070,6 +1070,7 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie > this._waterfallColumn = new WI.TableColumn("waterfall", WI.UIString("Waterfall"), { > minWidth: 230, > headerView: this._waterfallTimelineRuler, >+ needsReloadOnResize: true, > }); > > this._nameColumn.addEventListener(WI.TableColumn.Event.WidthDidChange, this._tableNameColumnDidChangeWidth, this); >diff --git a/Source/WebInspectorUI/UserInterface/Views/Table.js b/Source/WebInspectorUI/UserInterface/Views/Table.js >index 35202477c40..8c6be0a26cb 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/Table.js >+++ b/Source/WebInspectorUI/UserInterface/Views/Table.js >@@ -483,12 +483,21 @@ WI.Table = class Table extends WI.View > } > > // Re-layout all columns to make space. >+ this._widthGeneration++; > this._columnWidths = null; > this._resizeColumnsAndFiller(); > > // Now populate only the new cells for this column. > for (let cell of cellsToPopulate) > this._delegate.tablePopulateCell(this, cell, column, cell.parentElement.__index); >+ >+ // Now populate columns that may be sensitive to resizes. >+ for (let visibleColumn of this._visibleColumns) { >+ if (visibleColumn !== column) { >+ if (visibleColumn.needsReloadOnResize) >+ this.reloadVisibleColumnCells(visibleColumn); >+ } >+ } > } > > hideColumn(column) >@@ -533,14 +542,23 @@ WI.Table = class Table extends WI.View > if (!this._columnWidths) > return; > >- this._columnWidths.splice(columnIndex, 1); >- > for (let row of this._listElement.children) { > if (row !== this._fillerRow) > row.removeChild(row.children[columnIndex]); > } > >- this.needsLayout(); >+ // Re-layout all columns to make space. >+ this._widthGeneration++; >+ this._columnWidths = null; >+ this._resizeColumnsAndFiller(); >+ >+ // Now populate columns that may be sensitive to resizes. >+ for (let visibleColumn of this._visibleColumns) { >+ if (visibleColumn !== column) { >+ if (visibleColumn.needsReloadOnResize) >+ this.reloadVisibleColumnCells(visibleColumn); >+ } >+ } > } > > restoreScrollPosition() >diff --git a/Source/WebInspectorUI/UserInterface/Views/TableColumn.js b/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >index 408c2f6aa1e..385a3cbef06 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >@@ -25,7 +25,7 @@ > > WI.TableColumn = class TableColumn extends WI.Object > { >- constructor(identifier, name, {initialWidth, minWidth, maxWidth, hidden, sortable, hideable, align, resizeType, headerView} = {}) >+ constructor(identifier, name, {initialWidth, minWidth, maxWidth, hidden, sortable, hideable, align, resizeType, headerView, needsReloadOnResize} = {}) > { > super(); > >@@ -49,6 +49,7 @@ WI.TableColumn = class TableColumn extends WI.Object > this._align = align || null; > this._resizeType = resizeType || TableColumn.ResizeType.Auto; > this._headerView = headerView || null; >+ this._needsReloadOnResize = needsReloadOnResize || false; > > console.assert(!this._minWidth || !this._maxWidth || this._minWidth <= this._maxWidth, "Invalid min/max", this._minWidth, this._maxWidth); > console.assert(isNaN(this._width) || !this._minWidth || (this._width >= this._minWidth), "Initial width is less than min", this._width, this._minWidth); >@@ -67,6 +68,7 @@ WI.TableColumn = class TableColumn extends WI.Object > get hideable() { return this._hideable; } > get align() { return this._align; } > get headerView() { return this._headerView; } >+ get needsReloadOnResize() { return this._needsReloadOnResize; } > > get locked() { return this._resizeType === TableColumn.ResizeType.Locked; } > get flexible() { return this._resizeType === TableColumn.ResizeType.Auto; }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193696
: 359797 |
359808