Bug 23152 - background color in empty cell of table with cellpadding=0 should be rendered
Summary: background color in empty cell of table with cellpadding=0 should be rendered
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.mjlogicdesign.com/
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2009-01-06 15:22 PST by John Newlin
Modified: 2022-09-08 13:40 PDT (History)
4 users (show)

See Also:


Attachments
test case (125 bytes, text/html)
2009-01-06 22:58 PST, Robert Blaut
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Newlin 2009-01-06 15:22:14 PST
In the URL listed, the background behind the text is supposed to be white.

This renders correctly in: IE7, FireFox 3, and Opera 9.  In Chrome and Safari, the background is not the correct color.
Comment 1 Robert Blaut 2009-01-06 22:57:41 PST
Confirmed inconsistency with other browsers (Firefox, Opera) in quirks mode.

This particular code should render green box. 

<p>There should be green box below</p>
<table cellpadding="0" width="100"> 
<td height="100" bgcolor="green"></td> 
</table> 

This doesn't happen in WebKit r39669.
Comment 2 Robert Blaut 2009-01-06 22:58:14 PST
Created attachment 26485 [details]
test case
Comment 3 Robert Blaut 2009-01-06 23:10:03 PST
Rendering mode is irrelevant in this case. Bug is visible in quirks mode as well as in strict mode.
Comment 4 mvijay 2009-06-23 22:46:49 PDT
Hi,

I have the following analysis on this bug.Kindly guide me if I am wrong in my
approach.

The default cellpading attribute value is "1". 
When cellpadding="0" and while parsing this attribute, m_padding is set to 0 which should be 1.
So I have added an extra condition in the "if" statement checking if cell padding is 0 then preventing from reseting m_padding to 0 in the parseMappedAttribute()of the HTMLTableElement.cpp.

Let me know if this proposal can be used to fix this bug.
Comment 5 bharath patil 2012-10-18 04:06:09 PDT
In <td> if you mention the width attribute it will display properly.
Comment 6 Ahmad Saleem 2022-09-08 13:40:49 PDT
I am not able to reproduce this bug using attached test case and it shows "Green" box / square in Safari 15.6.1 and STP 153 similar to other browsers (Chrome Canary 107 and Firefox Nightly 106).

I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!