Web Inspector: Table should recalculate scrollable height when resized
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 22:54:18 +0000 (22:54 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 22:54:18 +0000 (22:54 +0000)
commit87dfdfc3c0fa0ffd0e0835ac48b77a81240715e1
tree9121306e592902e560ae03239e3bbbefcb9f6235
parent02af69c2d063e7e75921df5ee4cb2a475d21a83b
Web Inspector: Table should recalculate scrollable height when resized
https://bugs.webkit.org/show_bug.cgi?id=191328
<rdar://problem/45854412>

Reviewed by Devin Rousso.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._hideDetailView):
Force table columns to layout after hiding the detail view.

* UserInterface/Views/Table.js:
(WI.Table):
(WI.Table.prototype.showColumn):
Call `_resizeColumnsAndFiller` instead of `resize`. The latter also cleared
`_cachedWidth`, which isn't unnecessary since the width hasn't changed.

(WI.Table.prototype.layout):
previously `_resizeColumnsAndFiller` always occurred after `_updateVisibleRows`,
it was just a matter of whether the cached width and height were cleared first.
That now happens in `sizeDidChange`.

(WI.Table.prototype.sizeDidChange):
(WI.Table.prototype._updateVisibleRows):
(WI.Table.prototype.resize): Deleted.
Internally this cleared the cached width and height, which moved to `sizeDidChange`.
Externally this was used by NetworkTableContentView to force columns to
layout after hiding the details view. Calling `updateLayout` on the table
accomplishes the same thing using the standard View API.

(WI.Table.prototype._resizeColumnsAndFiller):
Only update the cached width, since the height will already have been
updated. The number of rows doesn't change during this method, so that
check was removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
Source/WebInspectorUI/UserInterface/Views/Table.js