NEW15268
display:table-row always shows as the first row irrespective of where its defined.
https://bugs.webkit.org/show_bug.cgi?id=15268
Summary display:table-row always shows as the first row irrespective of where its def...
Anantha Keesara
Reported 2007-09-24 08:00:31 PDT
Please see the attached testcase. All three browsers(IE,FF,Safari) render different.
Attachments
display:table-row always shows as the first row irrespective of where its defined. (263 bytes, text/html)
2007-09-24 08:01 PDT, Anantha Keesara
no flags
Safari 15.6 matches with Chrome but differs from Firefox (400.21 KB, image/png)
2022-07-25 16:49 PDT, Ahmad Saleem
no flags
Anantha Keesara
Comment 1 2007-09-24 08:01:14 PDT
Created attachment 16368 [details] display:table-row always shows as the first row irrespective of where its defined.
Robert Blaut
Comment 2 2008-03-09 13:56:59 PDT
In my opinion element with display:table-row shouldn't have influence on calculating parent element height like normal <tr> element so the case exposes bug in Webkit. Only Firefox displays it correctly. Opera also fails but differently.
Dave Hyatt
Comment 3 2008-03-09 14:01:49 PDT
The table is before the first div. This is clearly some kind of ordering bug. In addition in quirks mode we allow a table with no cells to have height (either from the row or the table specifying a height). However for CSS-anonymous tables we really should not support the quirk. So I see two bugs here.
Robert Blaut
Comment 4 2008-03-09 14:13:40 PDT
Ahmad Saleem
Comment 5 2022-07-25 16:49:17 PDT
Created attachment 461205 [details] Safari 15.6 matches with Chrome but differs from Firefox I am not sure on web-spec nor on expected result but as can be seen from attached screenshot - Safari matches with Chrome but differ from Firefox. Thanks!
Radar WebKit Bug Importer
Comment 6 2022-07-26 19:52:49 PDT
Karl Dubost
Comment 7 2025-12-01 00:51:23 PST
The original test case: <div style="border:2px solid black; width: 100px"> <div style=" border: 2px solid red; height: 60px; width: 80px; background-color: gold; "></div> <div style=" border: 2px solid green; width: 80px; background-color: pink; height: 20px; display: table-row; "></div> </div> * In Firefox, the second `div` has a computed width of 0 and a height of 16 px with a border of 2px (and still it is not visible at all) * In Chrome and Safari, the dimensions are the same *BUT we see the height* Interestingly if I do <table style="border:2px solid black; width: 100px"> <tr style="border: 2px solid red; height: 60px; width: 80px; background-color: gold;"></tr> <tr style="border: 2px solid green; width: 80px; height: 20px; background-color: pink;"></tr> </table> * In Firefox the second TR is 88x16px (but the space is not drawn) and even more bizarre the selector of devtools show the square below. * In Safari/Chrome it is 92x16 px (but the space is drawn) HTML spec For TR elements: Zero or more td, th, and script-supporting elements. https://html.spec.whatwg.org/#the-tr-element SO this is ok: <table><tr></tr></table> CSS 2 says: If a child C of a table-row box is not a table-cell, then generate an anonymous table-cell box around C and all consecutive siblings of C that are not table-cell boxes. https://drafts.csswg.org/css2/#anonymous-boxes CSS Table Module Level 3 (NOT READY for implementation) https://drafts.csswg.org/css-tables-3/ To summarize, an instance of the table model consists of: Its table-root containing: * Zero, one or more table rows, optionally in row groups, * Each of them containing one or more table cells. (<- NOT ZERO here) AND * A table-row is misparented if its parent is neither a table-row-group nor a table-root box. Beside their display type, the anonymous boxes created for fixup purposes do not receive any specific or default styling, except where otherwise mentioned by this specification. https://drafts.csswg.org/css-tables-3/#fixup-algorithm
Karl Dubost
Comment 8 2025-12-01 00:51:42 PST
Note You need to log in before you can comment on or make changes to this bug.