REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jul 2019 16:14:19 +0000 (16:14 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jul 2019 16:14:19 +0000 (16:14 +0000)
commite1c187d43e5c6356df3548e35ced0b1051533883
treecff337c47abf53077c2cbebc6092b5fe0a223e6a
parent0ab1df28b05fae45399b7b9cf8b3e7fc527a4b3f
REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table
https://bugs.webkit.org/show_bug.cgi?id=193841
<rdar://problem/47559124>

Reviewed by Devin Rousso.

Selecting and revealing a row after reloading Table data, but before the
layout that populates visible rows, could cause the Table to always be
scrolled so that the revealed row is first.

This patch fixes `revealRow` by calculating the position of the row being
revealed in the absence of its DOM element, so that the Table is only
scrolled when necessary.

* UserInterface/Views/Table.js:
(WI.Table.prototype.revealRow):
(WI.Table.prototype._resizeColumnsAndFiller):
Drive-by fix: use realOffsetWidth for consistency.
(WI.Table.prototype._updateVisibleRows):
(WI.Table.prototype._calculateOffsetHeight):
(WI.Table.prototype._calculateScrollTop):

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