Web Inspector: Network: importing a HAR with an active detail view shows no content
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 21:30:51 +0000 (21:30 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 21:30:51 +0000 (21:30 +0000)
commite583b304659dabff1e305c560926d91ab63bd44a
tree75aa53bed6e31d150718fe139a00b8729348677b
parentcd336ce3b7d05f68087432685fcad461adb37272
Web Inspector: Network: importing a HAR with an active detail view shows no content
https://bugs.webkit.org/show_bug.cgi?id=197223

Reviewed by Timothy Hatcher.

When hiding the detail view, we force a `layout` of the Network table, which causes the
cached row count to be set to `0`, which prevents the `reloadDataAddedToEndOnly` from
rendering anything since the `WI.Table` thinks it has no rows.

Given that all of the users of `WI.Table` are backed by an array, we don't need to cache the
number of rows since `.length` is an extremely cheap operation. In turn, this guarantees
that we are always rendering with an accurate value.

* UserInterface/Views/Table.js:
(WI.Table):
(WI.Table.prototype.get numberOfRows):
(WI.Table.prototype.reloadData):
(WI.Table.prototype._removeRows):

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