Summary: | Table cell background color isn't shown when cellpadding value is 0 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Gyuyoung Kim <gyuyoung.kim> | ||||||||
Component: | Tables | Assignee: | Gyuyoung Kim <gyuyoung.kim> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, rniwa, simon.fraser, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Created attachment 279952 [details]
WIP
Comment on attachment 279952 [details] WIP View in context: https://bugs.webkit.org/attachment.cgi?id=279952&action=review > Source/WebCore/html/HTMLTableElement.cpp:418 > + m_padding = std::max(1, value.toInt()); I think this is very wrong fix. But it looks this is a clue how to fix this issue correctly. Created attachment 461720 [details] Safari 15.6.1 differs from other browsers I took the test case from Comment 0 and changed it into following: JSFiddle Link - https://jsfiddle.net/zj435kLv/show As ca be seen from screenshots, this is reproducible in Safari 15.6.1 and also in Safari Technology Preview 151. It fills the color in the all cells while all other browsers render differently but matching each other. Attached WIP patch was modifying following: https://github.com/WebKit/WebKit/blob/147df77f6bb805a2c35456b30b5bbb8f794b043c/Source/WebCore/html/HTMLTableElement.cpp#L402 Just wanted to share updated results. Thanks! |
Created attachment 279951 [details] Table screenshot Unlike other browsers, when *cellpadding* value is defined to 0, table cell has been filled with table bgcolor, not table cell color. <table border="0" width="100%" height="40" cellspacing="1" cellpadding="0" bgcolor="#B7BA52"> <tr bgcolor="#FFFFFF"> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#FFFFFF"> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#FFFFFF"> <td></td> <td></td> <td></td> </tr> </table> I attach a screenshot to show how to draw this code on WebKit.