In the separate border model, offsetTop and offsetHeight for a table row group includes vertical border spacing. But these offsets shouldn't include vertical border spacing from my understanding of the first and third paragraphs of <http://www.w3.org/TR/CSS2/tables.html#table-layout> (W3C Recommendation 07 June 2011), reproduced here:
Internal table elements generate rectangular boxes with content and borders. Cells have padding as well. Internal table elements do not have margins.
The edges of the rows, columns, row groups and column groups in the collapsing borders model coincide with the hypothetical grid lines on which the borders of the cells are centered. (And thus, in this model, the rows together exactly cover the table, leaving no gaps; ditto for the columns.) In the separated borders model, the edges coincide with the border edges of cells. (And thus, in this model, there may be gaps between the rows, columns, row groups or column groups, corresponding to the 'border-spacing' property.)
That is, the offsetTop of a row group should be equal to the offsetTop of the left-most cell in the first row and the offsetHeight of a row group should be equal to the vertical border spacing between its rows plus the sum of the offsetHeights of its rows.
Currently, the offsetTop of a row group differs from the expected result because it includes the vertical spacing before the first row in the group. The offsetHeight of a row group differs from the expected result because it includes vertical border spacing both before the first row in the group and after the last row in the group.
Created attachment 224530 [details]
DRT test. This test assumes it's in directory LayoutTests/fast/table and that the file hierarchy of LayoutTests matches r164112.
Created attachment 224531 [details]
A self-contained version of the attached DRT test (attachment 224530 [details]).
For completeness, I came across this bug when working on the patch for bug #15277.
Created attachment 460173 [details]
Safari 15.5 output
I am able to reproduce this bug from attached (self-contained test) test case in Safari 15.5 on macOS 12.4 where in "separate", it fails three tests out of four. While Chrome Canary 104 fails only one. Firefox Nightly 103 passes all tests. Thanks!