Bug 129671 - invalid display of table for which css style inline is defined
Summary: invalid display of table for which css style inline is defined
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 137505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-22 22:51 UTC by Alexander Denisjuk
Modified: 2008-01-05 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
table illustrating behaviour of vertical-align as applied to tables with display:inline (8.21 KB, text/html)
2008-01-05 12:33 UTC, Stevan White
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Denisjuk 2006-06-22 22:51:28 UTC
Version:           3.5.3 (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.16

I defined a css style element table {display:inline}. However tables are displayed with a linebreak after. Here is an exmaple (XHTML/CSS cheked):
===================================================================
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!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>
<style type="text/css">
body {text-align:center}
table {display:inline}
img {margin:1em;padding:0em;border-style:solid;border-width:1em;border-color:rgb(250,240,230)}
</style>
<title>
2006-06-22-Ustron
</title></head><body>
<hr />
<table>
<tr> <td>
<a href='IMG_1319.JPG' ><img height='75' src='_IMG_1319.JPG' alt='IMG_1319.JPG' 
title='IMG_1319.JPG (1416600 bytes)' /></a>
</td></tr><tr>
<th>
IMG_1319.JPG<br />(1416600 bytes)</th></tr></table>
<table>
<tr> <td>
<a href='IMG_1321.JPG' ><img height='75' src='_IMG_1321.JPG' alt='IMG_1321.JPG' 
title='IMG_1321.JPG (1217626 bytes)' /></a>
</td></tr><tr>
<th>
IMG_1321.JPG<br />(1217626 bytes)</th></tr></table>
<hr />
</body></html>
==================================================================================
Comment 1 Allan Sandfeld 2006-06-22 23:15:48 UTC
You can't set a table inline. You might want to try display: inline-table

Of course you might argue that we should have the _quirk_ where we rewrite attempts to set tables inline to inline-table. I know Safari does this, but I am unsure how it is handled by other browsers.
Comment 2 Alexander Denisjuk 2006-06-22 23:26:26 UTC
Why I can not set a table inline? I checked  CSS by W3C CSS checker, it found it correct. 

'inline-table' works fine, without linebreaks. 

However I noticed that Firefox displays 'inline-table' in incorrect way: with linebreak after. I tried 'inline'. Firefox displays table without linebreak, but Konqueror does. Since I use Konqueror, my wife prefers Firefox, I decided to report bugs to both browsers:-).
Comment 3 Allan Sandfeld 2006-06-22 23:48:24 UTC
Well actually if you interpret it strictly a TABLE with inline display cannot contain table-section or table-rows, because inline elements can only contain other inline elements or text. You need to have a table or inline-table to have something to put table-content into. 

Funny that Firefox supports inline-table only when declared quirky. Can you test with IE?
Comment 4 Alexander Denisjuk 2006-06-22 23:56:04 UTC
Well, I agree with your argument, I will leave 'inline-table' in my html.

So, may I submit it not as a bug, but as a wish for Konqueror team.

I am still waiting for an account to submit a bug to Gecko/Firefox.

I can not check with IE. I don't have any.
Comment 5 Allan Sandfeld 2006-11-13 01:35:50 UTC
SVN commit 604496 by carewolf:

Rewrite display:inline on TABLE to display:inline-table
A quirk Dirk left out ages ago, but it looks like we need it
BUG: 136240
BUG: 129671
CCBUG: 107336


 M  +2 -2      cssstyleselector.cpp  


--- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #604495:604496
@@ -633,8 +633,8 @@
                 style->setDisplay(TABLE_CELL);
                 style->setFloating(FNONE);
             }
-//             else if (e->id() == ID_TABLE)
-//                 style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE);
+            else if (e->id() == ID_TABLE)
+                style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE);
         }
 
         // Table headers with a text-align of auto will change the text-align to center.
Comment 6 Allan Sandfeld 2006-11-19 17:12:17 UTC
*** Bug 137505 has been marked as a duplicate of this bug. ***
Comment 7 Stevan White 2008-01-05 12:29:38 UTC
This is still a problem in 3.5.8.  When may we expect to see the fix?
Comment 8 Stevan White 2008-01-05 12:33:25 UTC
Created attachment 22843 [details]
table illustrating behaviour of vertical-align as applied to tables with display:inline
Comment 9 Stevan White 2008-01-05 12:34:43 UTC
Once display:inline is fixed, the next question is, does vertical-align behave properly?

Please refer to the attached table, which is also available at
http://www.zipcon.net/~swhite/docs/computers/browsers/table_vertical_align.html
Comment 10 Germain Garand 2008-01-05 20:55:05 UTC
re#7: The testcase is broken. It bears a strict doctype but uses a quirk (display:inline is not the same as display:inline-table no matter how many browsers get it wrong). 
Quirks, as logic demand, only work in quirkmode.

> the next question is, does vertical-align behave properly?

once the testcase is fixed, assuming the text in green does describe the proper behaviour, which I have no time to double-check, then it is all fine, with the possible exception of vertical-align: sub, which expected behaviour isn't described, but doesn't look consistent with what we are doing with sup.