Bug 267854 - [CSS 2.1 Conformance] border-collapse does not and should not involve border of a table caption
Summary: [CSS 2.1 Conformance] border-collapse does not and should not involve border ...
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.8.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://www.gtalbot.org/BrowserBugsSec...
Keywords: reproducible, testcase, triaged
Depends on:
Blocks:
 
Reported: 2011-03-07 06:40 UTC by Gérard Talbot (no longer involved)
Modified: 2012-06-21 19:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2011-03-07 06:40:42 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

Border-collapse applies to cells, rows, columns, colgroups, row-groups, table box itself but not to table caption. In the CSS 2.1 spec, a table caption is not considered as a table cell and is not part of the table box itself. Border-collapse only applies to the table box itself and to its internal components.

17.4 Tables in the visual formatting model
"
(...) the table generates a principal block box called the table wrapper box that contains the table box itself and any caption boxes (in document order). The table box is a block-level box that contains the table's internal table boxes. The caption boxes are block-level boxes that retain their own content, padding, margin, and border areas, and are rendered as normal block boxes inside the table wrapper box.
(...)"
17.4 Tables in the visual formatting model
http://www.w3.org/TR/CSS21/tables.html#model


Section 17.6.2 The collapsing border model
http://www.w3.org/TR/CSS21/tables.html#tables-intro
makes no mention of table caption involvements (none whatsoever) in the border-collapse model.

URL of testcase
---------------
A)
http://test.csswg.org/suites/css2.1/20110111/html4/border-collapse-offset-002.htm (RC5)

B)
http://www.gtalbot.org/DHTMLSection/DynamicTableFormatting.html

Reproducible: Didn't try

Steps to Reproduce:
A) Load provided testcase

B) Load provided testcase and then check the checkbox "border-collapse"

Actual Results:  
A) The green border-bottom of the caption box is partially overlapped by the orange border of the table cell

B) the red border-bottom of the caption box disappears completely

Expected Results:  
A) Reftest
http://test.csswg.org/suites/css2.1/20110111/html4/border-collapse-offset-002-ref.htm

B) The red border-bottom of the caption box should remain unaffected, fully visible

IE8, IE9 beta1, Firefox 3.6.15, Firefox 4.0 beta6, Opera 11.01 and Chrome 9.0.597.107 pass this test.

A smaller, better targeted testcase could be created.

Linux 2.6.35-27-generic-pae, Qt 4.7.0, Konqueror 4.6.1, KDE 4.6.1 here.

regards, Gérard Talbot
Comment 1 Gérard Talbot (no longer involved) 2011-03-07 07:03:42 UTC
A much better, reduced and accurate testcase for this bug is:

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/bug267854-border-collapse-vs-caption.html

regards, Gérard
Comment 2 Gérard Talbot (no longer involved) 2011-03-07 07:09:57 UTC
Also

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/bug267854-border-collapse-vs-caption-2.html

Gérard
Comment 3 Gérard Talbot (no longer involved) 2011-03-20 20:32:18 UTC
"
If border styles differ only in color, then a style set on a cell wins over one on a row, which wins over a row group, column, column group and, lastly, table.
"
CSS 2.1, section 17.6.2.1 Border conflict resolution
http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution

As you can notice, table-caption is not listed in the precedence ("wins over") rules; so table-caption does not participate, is not involved in border conflict resolution.

Gérard
Comment 4 Gérard Talbot (no longer involved) 2011-06-19 22:13:33 UTC
1-
The subtile effect of this bug can be noticed in webpage situations where the descenders' letters (g, j, p, q, y) of a test in the caption block box are overlapped by the table box's collapsed border-top.

2- 
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/bug267854-border-collapse-vs-caption.html
and
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/bug267854-border-collapse-vs-caption-2.html
cover cases of border collapsing of table box's border-top and table cell's (of topmost row) border-top with border-bottom of caption but border collapsing can occur with the involvement of border collapsed table row, table row group, table column, table column group. And caption can be placed at caption-side: top or caption-side: bottom. So, at least 8 additional testcases would be needed to make sure this bug gets fixed in all border-collapsed situations.

3-
Links to testcases of latest RC of CSS 2.1 test suite (the links will be redirected accordingly, appropriately)

Testcase:
http://test.csswg.org/suites/css2.1/latest/html4/border-collapse-offset-002.htm

Testcase reference (expected results):
http://test.csswg.org/suites/css2.1/latest/html4/border-collapse-offset-002-ref.htm

Gérard
Comment 5 Gérard Talbot (no longer involved) 2012-06-21 19:05:00 UTC
This bug still happens.

I am using
KDE Platform Version: 4.8.4
Konqueror version: 4.8.4 (with KHTML rendering engine)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-25-generic-pae i686 (32bits)
Distribution: Kubuntu 12.04 LTS
here.

Gérard