Bug 128988 - offset{Height, Top} incorrect for table row groups in separate border model
Summary: offset{Height, Top} incorrect for table row groups in separate border model
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-18 11:45 PST by Daniel Bates
Modified: 2017-07-19 15:02 PDT (History)
3 users (show)

See Also:


Attachments
DRT test (3.73 KB, text/html)
2014-02-18 11:51 PST, Daniel Bates
no flags Details
Self-contained Test (25.79 KB, text/html)
2014-02-18 11:52 PST, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 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.
Comment 1 Daniel Bates 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.
Comment 2 Daniel Bates 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]).
Comment 3 Daniel Bates 2014-02-18 12:14:53 PST
For completeness, I came across this bug when working on the patch for bug #15277.