Bug 181963

Summary: [CSS 2.1 Conformance] The baseline of an 'inline-table' is the baseline of the first row of the table
Product: [Applications] konqueror Reporter: Gérard Talbot (no longer involved) <browserbugs2>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: CONFIRMED ---    
Severity: normal CC: florian.reinhard, maksim
Priority: NOR Keywords: testcase, triaged
Version: 4.7.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
URL: http://www.gtalbot.org/BrowserBugsSection/Safari3Bugs/baseline-inline-table-vertical-align.html
Latest Commit: Version Fixed In:

Description Gérard Talbot (no longer involved) 2009-01-26 10:50:20 UTC
Description:
In Konqueror 4.1.3, the baseline of an 'inline-table' is NOT the baseline of the first row of the table. 
According to CSS 2.1, the baseline of an 'inline-table' should be the baseline of the first row of the table. 

Self-explanatory testcase:
http://www.gtalbot.org/BrowserBugsSection/Safari3Bugs/baseline-inline-table-vertical-align.html

Expected results:
__Baseline_of_first_row_of_table__ should be vertically aligned with ___text baseline___ on both sides. The underscore characters of the anonymous text nodes should adjoin, should meet, should vertically line up with the underscore characters of the cell of first row of inline-table.

Actual results in Konqueror 4.1.3 and in Safari 3.2 build 525.26.13:
The margin bottom edge of the inline-table is aligned with ___text baseline___ on both sides. The underscore characters of the anonymous text nodes do not adjoin, do not meet, do not vertically line up with the underscore characters of the cell of first row of inline-table.

References:
"(...) The baseline of an 'inline-table' is the baseline of the first row of the table."
coming from CSS 2.1, section 10.8.1 Leading and half-leading, vertical-align
http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align

"The 'vertical-align' property of each table cell determines its alignment within the row. (...) The baseline of the cell is put at the same height as the baseline of the first of the rows it spans (...)"
coming from CSS 2.1, section 17.5.3 Table height algorithms
http://www.w3.org/TR/CSS21/tables.html#height-layout

Notes:
- Internet Explorer 8 pre-RC1 Partner Build 18344, Firefox 3.0.5, Opera 9.63, Opera 10.0 alpha build 1229 all pass the provided testcase.
- More advanced or complex tests can be found at Vertical alignment of inline table testpage
http://geocities.com/csssite/operabugs/bug34.xml
from George Chavchanidze
- I searched for a DUPLICATE and did not find any. 

Regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2009-01-26 11:19:48 UTC
This bug has also been filed at WebKit Bugzilla:
https://bugs.webkit.org/show_bug.cgi?id=23544
Comment 2 Florian Reinhard 2009-06-20 18:45:21 UTC
still exits in 4.2.90/2
Comment 3 Maksim Orlovich 2010-04-04 23:58:46 UTC
Weird --- the code disables it supposedly for compatibility with Gecko, which doesn't do this.
--- rendering/render_table.cpp  (revision 1110535)
+++ rendering/render_table.cpp  (working copy)
@@ -127,7 +127,7 @@
     // CSS2.1 - 10.8.1 The baseline of an 'inline-table' is the baseline of the first row of the table.
     if (isReplaced() && !needsLayout()) {
         // compatibility with Gecko: only apply to generic containers, not to HTML Table.
        if (element() && element()->id() == ID_TABLE)


Disabling this special-casing fixes the testcase, but I am not sure of all the implications. 

(I am also feeling like this came up before)
Comment 4 Gérard Talbot (no longer involved) 2011-04-05 00:33:59 UTC
Additional testcases from CSS 2.1 test suite (RC6):
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-002a.htm
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-002b.htm

Expected result (reftest): 
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-002-ref.htm

Konqueror 4.6.1 fails inline-table-002b but passes inline-table-002a

--------------------

Additional testcase from CSS 2.1 test suite (RC6):
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-003.htm

Expected result (reftest): 
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-003-ref.htm

Konqueror 4.6.1 passes inline-table-003

--------------------

Additional testcase from CSS 2.1 test suite (RC6):
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-valign-001.htm

Expected result (reftest): 
http://test.csswg.org/suites/css2.1/20110323/html4/inline-table-valign-001-ref.htm

Konqueror 4.6.1 fails inline-table-valign-001

regards, Gérard