Bug 128988

Summary: offset{Height, Top} incorrect for table row groups in separate border model
Product: WebKit Reporter: Daniel Bates <dbates>
Component: TablesAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bdakin, hyatt, korisu, mattwoodrow, rniwa, simon.fraser, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
DRT test
none
Self-contained Test
none
Safari 15.5 output none

Daniel Bates
Reported 2014-02-18 11:45:44 PST
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.
Attachments
DRT test (3.73 KB, text/html)
2014-02-18 11:51 PST, Daniel Bates
no flags
Self-contained Test (25.79 KB, text/html)
2014-02-18 11:52 PST, Daniel Bates
no flags
Safari 15.5 output (664.92 KB, image/png)
2022-06-10 17:33 PDT, Ahmad Saleem
no flags
Daniel Bates
Comment 1 2014-02-18 11:51:07 PST
Created attachment 224530 [details] DRT test DRT test. This test assumes it's in directory LayoutTests/fast/table and that the file hierarchy of LayoutTests matches r164112.
Daniel Bates
Comment 2 2014-02-18 11:52:22 PST
Created attachment 224531 [details] Self-contained Test A self-contained version of the attached DRT test (attachment 224530 [details]).
Daniel Bates
Comment 3 2014-02-18 12:14:53 PST
For completeness, I came across this bug when working on the patch for bug #15277.
Ahmad Saleem
Comment 4 2022-06-10 17:33:26 PDT
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!
Note You need to log in before you can comment on or make changes to this bug.