Support tables with more than one caption
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: dshin, Unassigned)
References
Details
Attachments
(1 file)
922 bytes,
text/html
|
Details |
STR: Load attached test case
Expected: Two lime green boxes, one above and one below the table.
Actual: Only one shown - the top caption.
Taken from baseline-source
WPT test.
Comment 1•2 years ago
|
||
It looks like we support (at-most) one caption frame.
Some code references:
https://searchfox.org/mozilla-central/rev/ad732108b073742d7324f998c085f459674a6846/layout/tables/nsTableWrapperFrame.h#21
* the nsTableWrapperFrame contains 0 or one caption frame, and a nsTableFrame
// We only have two child frames: the inner table and a caption frame.
Note: nsTableWrapperFrame
does have a member-var mCaptionFrames
which sounds plural, but we seem to treat it as only ever having one entry.
Spec-wise, though: I checked the css-tables-3 spec, and it does seem to indicate that tables are expected to support multiple captions. e.g. https://drafts.csswg.org/css-tables-3/#table-layout-algorithm says:
Compute the height of the table.
This is done by returning the sum of all table-caption heights (their width being set to the table width
The wording here makes it clear that a single table can have multiple captions.
CSS 2.1 also seems to indicate multiple captions were expected to work, too -- "...the table box itself and any caption boxes..." at https://www.w3.org/TR/CSS21/tables.html#model
So I guess this is a piece of table layout that we never implemented.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I guess this is tracked in bug 144517 . (The first few comments are a bit of a diversion around possibly-broken markup, but later comments/dupes settle it on being about this issue.)
Description
•