Closed Bug 608531 Opened 14 years ago Closed 13 years ago

Wrong drawing of borders through a table's cell with rowspan="2" if border-bottom-width is used to set different border-widths for some rows.

Categories

(Core :: Layout: Tables, defect)

1.9.2 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 332740

People

(Reporter: nikolai.husung, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 If some rows get a bolder border-bottom-width and I use cells with rowspan="2" each first column in a row with this rowspan except in the first and the last (in my example) two rows will be drawn like the given rowspan with its contents. But they will be overdrawn in their middle by the bottom-/top-border which shouldn't be drawn because of the rowspan. If I remove the different border-bottom-widths the problem doesn't occur anymore. This is the document I've written: <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Fahrtenbuch</title> </head> <body> <p style="font-size: 22; font-weight: bold; color: red;">Nicht alle Tabelleneintr&#228;ge sind von der Eingabe her korrekt!</p> <table border="2" style="border-collapse: collapse; border: 2px solid black; page-break-after: always;" cellspacing="3"> <colgroup> <col width="54" valign="middle" /> <col width="300" valign="middle" /> <col width="64" span="3" valign="middle" /> <col width="83" valign="middle" /> </colgroup> <thead style="border: 2px solid black;"> <tr> <td>Datum/Zeit</td> <td>von/nach</td> <td>Start (km)</td> <td>L&#228;nge (km)</td> <td>Gesamt (km)</td> <td>Unterschrift</td> </tr> </thead> <tbody> <tr> <td style="vertical-align: top;">25.04.1996 13:30</td> <td style="vertical-align: top;">Teststart</td> <td style="text-align: right;" rowspan="2">25,23</td> <td style="text-align: right;" rowspan="2">33,4</td> <td style="text-align: right;" rowspan="2">58,63</td> <td rowspan="2"></td> </tr> <tr style="border-bottom: 2px solid black;"> <td style="vertical-align: top;">25.04.1996 14:00</td> <td style="vertical-align: top;">Testziel</td> </tr> <tr> <td style="vertical-align: top;">25.04.1996 15:00</td> <td style="vertical-align: top;">Testziel</td> <td style="text-align: right;" rowspan="2">58,63</td><!-- wrong border behaviour --> <td style="text-align: right;" rowspan="2">5,0</td> <td style="text-align: right;" rowspan="2">63,63</td> <td rowspan="2"></td> </tr> <tr style="border-bottom: 2px solid black;"> <td style="vertical-align: top;">25.04.1996 15:10</td> <td style="vertical-align: top;">TestZiel2</td> </tr> <tr> <td style="vertical-align: top;">25.04.1996 16:00</td> <td style="vertical-align: top;">TestZiel2</td> <td style="text-align: right;" rowspan="2">63,63</td><!-- wrong border behaviour --> <td style="text-align: right;" rowspan="2">6,0</td> <td style="text-align: right;" rowspan="2">69,63</td> <td rowspan="2"></td> </tr> <tr style="border-bottom: 2px solid black;"> <td style="vertical-align: top;">25.04.1996 16:09</td> <td style="vertical-align: top;">Teststart</td> </tr> <tr> <td style="vertical-align: top;">33. . :5 </td> <td style="vertical-align: top;">TEstempty</td> <td style="text-align: right;" rowspan="2">69,63</td> <td style="text-align: right;" rowspan="2">0,0</td> <td style="text-align: right;" rowspan="2">69,63</td> <td rowspan="2"></td> </tr> <tr style="border-bottom: 2px solid black;"> <td style="vertical-align: top;">. . 4 : </td> <td style="vertical-align: top;"></td> </tr> </tbody> </table> </body> </html> Reproducible: Always Steps to Reproduce: 1.Take the xhtml1.1 document from Details and remove style="border-bottom: 2px solid black;" from each table row. -> You will see that the borders behave right. 2.Now add The borders are drawn through a table's cell with rowspan="2". again where you have removed it. -> You will see the above mentioned problem. 3. Actual Results: The borders are drawn through a table's cell with rowspan="2". Expected Results: The borders shouldn't be drawn through a table's cell with rowspan="2" if I use style="border-bottom: 2px solid black;" for some table rows. I use the default theme of Firefox and haven't changed anything of the functionality of Firefox.
Version: unspecified → 1.9.2 Branch
Looks like bug 322810 or one of its dependencies.
Depends on: 322810
Some things that I have found out about the test case I uploaded: If you remove the last row (1), remove any row above the one with the wrong border (2), remove the <thead> tag and put everything into the <tbody> (3), remove both the <thead> and the <tbody> tag (4), remove the CSS rule for the ".bug" class OR change it to "1px ..." (5), or remove the CSS rule with "border-collapse" (6), the rendering is correct. I hope this is useful to someone.
Comment on attachment 497294 [details] Simplified testcase (XHTML 1.0 Strict); Shows that issue also affects top-borders ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ><html xmlns="http://www.w3.org/1999/xhtml"> ><head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <title>bug</title> > <style type="text/css"> > table{ > border-collapse: collapse; > } > td{ > border: 1px solid black; > } > tr.bug{ > border-top: 2px solid black; > } > </style> ></head> ><body> ><table> > <thead> > <tr> > <td>&nbsp;</td> > <td>&nbsp;</td> > </tr> > </thead> > <tbody> > <tr> > <td>&nbsp;</td> > <td rowspan="2">&nbsp;</td> > </tr> > <tr> > <td>&nbsp;</td> > </tr> > <tr class="bug"> > <td>&nbsp;</td> > <td rowspan="2">&nbsp;</td> <!-- Incorrect rendering! --> > </tr> > <tr> > <td>&nbsp;</td> > </tr> > <tr> > <td>&nbsp;</td> > <td>&nbsp;</td> > </tr> > </tbody> ></table> ></body> ></html>
Comment on attachment 497294 [details] Simplified testcase (XHTML 1.0 Strict); Shows that issue also affects top-borders Im sorry, I'm having some trouble here. In the attachment, the style-element should obviously contain this for tr.bug: > tr.bug{ > border-top: 2px solid black; /* has to be different from the other borders, i.e. not 1px */ > } instead of what I actually posted. It turns out that you can't edit attachments and not even delete or edit comments, so I'm sorry for causing this mess.
I have a very similar case involving borders appearing where they shouldn't across rowspan cells, involving "border-collapse: collapse;" in FF 3.6.14 and in FF 4.0 beta 12: http://www.markporthouse.net/stuff/tabletest.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> table{ border-collapse: collapse; } td{ border-style: solid; border-width: 2px; } /* border style in the first column */ td:first-child{ border-right-style: none; } /* border style in the second column */ td:first-child + td { border-left-style: none; } </style> </head> <body> <table> <tr> <td>some text</td> <td rowspan="2">some text</td> </tr> <tr> <td>some text</td> </tr> <tr> <td>some text</td> <td rowspan="2">some text</td> </tr> <tr> <td>some text</td> </tr> <tr> <td>some text</td> <td>some text</td> </tr> </table> </body> </html>
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
No longer depends on: 322810
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: