Bug 124312 - [testcase] width:0% in table/tr/td not show correctly
Summary: [testcase] width:0% in table/tr/td not show correctly
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-26 18:47 UTC by Cyril Chaboisseau
Modified: 2011-06-27 20:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase as attachment for ease of saving (1022 bytes, text/html)
2006-03-26 23:04 UTC, Philip Rodrigues
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril Chaboisseau 2006-03-26 18:47:34 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

when rendering a table with many lines, width:0% have a size of approximately 16% while it should be invisible

here is a test case :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>test</title>
</head>
<body>

<table style="width: 80%">
<tr><td>l1</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:0%"></td><td>0</td></tr>
</table></td></tr>
<tr><td>l2</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:1%"></td><td>1</td></tr>
</table></td></tr>
<tr><td>l3</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:2%"></td><td>2</td></tr>
</table></td></tr>
<tr><td>l4</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:16%"></td><td>16</td></tr>
</table></td></tr>
<tr><td>l5</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:50%"></td><td>50</td></tr>
</table></td></tr>
<tr><td>l6</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:100%"></td><td>100</td></tr>
</table></td></tr>
</table>

</body>
</html>
Comment 1 Philip Rodrigues 2006-03-26 23:04:38 UTC
Created attachment 15318 [details]
Testcase as attachment for ease of saving
Comment 2 Allan Sandfeld 2006-06-17 17:45:16 UTC
unconfirming again. We behave the same as Firefox in this case.
Comment 3 Cyril Chaboisseau 2006-06-17 23:00:07 UTC
well, you're right in this _particular_ case that both are giving the same result ...but still the behaviour is odd

now , in my original example they really act differently and the reason why it didn't show up in my example is because I over simplified the html

to see how both behave differently, just add :

<style>
td { padding: 0; }
</style>

in the head section

you can also check it here :

http://adren.mine.nu/~cyril/width0.html


and here is the source :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>test</title>
<style>
td { padding: 0; }
</style>
</head>
<body>

<table style="width:80%">
<tr><td>l1</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:0%"></td><td>0</td></tr>
</table></td></tr>
<tr><td>l2</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:1%"></td><td>1</td></tr>
</table></td></tr>
<tr><td>l3</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:2%"></td><td>2</td></tr>
</table></td></tr>
<tr><td>l4</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:16%"></td><td>16</td></tr>
</table></td></tr>
<tr><td>l5</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:50%"></td><td>50</td></tr>
</table></td></tr>
<tr><td>l6</td><td><table style="width:70%">
<tr><td style="background-color: #f99; width:100%"></td><td>100</td></tr>
</table></td></tr>
</table>

</body>
</html>
Comment 4 James Spahlinger 2008-04-19 21:02:35 UTC
Second test case works correctly in 4.0.3

Using Gentoo Linux ~x86 (testing in gentoo lingo). KDE and the majority of packages compiled using gcc 4.3.0.
Comment 5 Martin Koller 2011-06-27 20:54:21 UTC
I checked with konqi 4.6.4, KHTML and Webkit, Firefox and opera.
All browsers, except KHTML, do not show a bar in the case of 0%.
KHTML shows a 1 pixel wide bar. (bar being the cell with a red background).

So who is correct ?