Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5e9140c0c7ed63b49ac8cbbee2ee8f392adf024c
https://github.com/WebKit/WebKit/commit/5e9140c0c7ed63b49ac8cbbee2ee8f392adf024c
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
A LayoutTests/inspector/table/table-column-and-row-boundaries-expected.txt
A LayoutTests/inspector/table/table-column-and-row-boundaries.html
M Source/WebInspectorUI/UserInterface/Views/Table.js
Log Message:
-----------
Web Inspector: Table._isRowVisible off-by-one and showColumn throws when the
shown column is the only visible column
https://bugs.webkit.org/show_bug.cgi?id=319353
rdar://182164511
Reviewed by Devin Rousso.
Two boundary bugs in Table:
- `_isRowVisible` compared against `_visibleRowIndexEnd` with `<=`, but that
index is an exclusive bound everywhere else (rows are created only for
`i < _visibleRowIndexEnd`), so it reported one non-rendered row as visible.
`cellForRowAndColumn` would then pass the visibility gate and return a cache
miss (or a stale row). Use `<`.
- `_indexToInsertColumn` dereferenced
`_visibleColumns[currentVisibleColumnIndex]`
without a bounds check. `showColumn` calls it before inserting the column, so
when the shown column is about to become the only visible one (empty
`_visibleColumns`) and it isn't first in `_columnOrder`, the deref threw
`undefined is not an object`. Guard the index against
`_visibleColumns.length`.
* Source/WebInspectorUI/UserInterface/Views/Table.js:
(WI.Table.prototype._isRowVisible):
(WI.Table.prototype._indexToInsertColumn):
* LayoutTests/inspector/table/table-column-and-row-boundaries-expected.txt:
Added.
* LayoutTests/inspector/table/table-column-and-row-boundaries.html: Added.
Canonical link: https://commits.webkit.org/317154@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications