Bug 115356 - Khtml doesn't render tables with border-collapse: collapse and borders set on thead, tfoot and tbody
Summary: Khtml doesn't render tables with border-collapse: collapse and borders set on...
Status: RESOLVED DUPLICATE of bug 108047
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-30 01:07 UTC by Pavel Simerda
Modified: 2006-10-14 20:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Page source (valid and clean) (1.42 KB, text/html)
2005-10-30 01:09 UTC, Pavel Simerda
Details
Screenshot from konqueror (with bugs) (36.17 KB, image/png)
2005-10-30 01:12 UTC, Pavel Simerda
Details
Expected rendering (firefox) (20.35 KB, image/png)
2005-10-30 01:13 UTC, Pavel Simerda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Simerda 2005-10-30 01:07:27 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

There's a clean example of a styled table. It contains thead, tfoot and tbody, all with table rows.

These css rules are specified:
---------------------------
table {
  border-collapse: collapse;
  border-width: 2px;
  border-style: solid;
}
thead, tbody {
  border-width: 2px;
  border-style: solid;
}
td, th {
  border-width: 1px;
  border-style: solid;
}
---------------------------
Expected behaviour:

You shoud see a table with 2px border around it and between parts of the table. Cells are divided by 1px border.
---------------------------
Khtml bugs:

1) Tfoot element is shifted by some 2 pixels to the left.

2) Borders between two tbody elements and between thead and tbody did not collapse. They are 4px instead of 2px.
---------------------------
I will append the testcase and screenshots
Comment 1 Pavel Simerda 2005-10-30 01:09:31 UTC
Created attachment 13215 [details]
Page source (valid and clean)
Comment 2 Pavel Simerda 2005-10-30 01:12:29 UTC
Created attachment 13216 [details]
Screenshot from konqueror (with bugs)
Comment 3 Pavel Simerda 2005-10-30 01:13:16 UTC
Created attachment 13217 [details]
Expected rendering (firefox)
Comment 4 Tommi Tervo 2006-05-05 11:48:40 UTC

*** This bug has been marked as a duplicate of 108047 ***
Comment 5 Allan Sandfeld 2006-10-14 20:30:48 UTC
SVN commit 595538 by carewolf:

Table-sections do not have their own border in collapsed-border model.
BUG: 108047
CCBUG: 115356


 M  +5 -0      render_table.h  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.h #595537:595538
@@ -248,6 +248,11 @@
     virtual int leftmostPosition(bool includeOverflowInterior, bool includeSelf) const;
     virtual int highestPosition(bool includeOverflowInterior, bool includeSelf) const;
 
+    int borderLeft() const { return table()->collapseBorders() ? 0 : RenderBox::borderLeft(); }
+    int borderRight() const { return table()->collapseBorders() ? 0 : RenderBox::borderRight(); }
+    int borderTop() const { return table()->collapseBorders() ? 0 : RenderBox::borderTop(); }
+    int borderBottom() const { return table()->collapseBorders() ? 0 : RenderBox::borderBottom(); }
+
     virtual void paint( PaintInfo& i, int tx, int ty);
 
     int numRows() const { return grid.size(); }