Bug 18129 - webkit doesn't set BGCOLOR for an empty cell <td>
Summary: webkit doesn't set BGCOLOR for an empty cell <td>
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.google.com/trends?q=mother...
Keywords: GoogleBug, HasReduction
: 22336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-26 17:56 PDT by jasneet
Modified: 2022-08-15 15:07 PDT (History)
10 users (show)

See Also:


Attachments
screenshot (167.39 KB, image/jpeg)
2008-03-26 17:57 PDT, jasneet
no flags Details
reduction (518 bytes, text/html)
2008-03-26 17:57 PDT, jasneet
no flags Details
Safari 15.6 differs from other browsers (1.42 MB, image/png)
2022-08-15 15:07 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-03-26 17:56:46 PDT
I Steps:
Go to 
http://id5.cn/newssystem/newscontent.jsp?newstype=3&newscode=4164
Scroll to the end of the page.

II Issue:
The border line which divides center column content and footer is not seen.

III Conclusion:
Webkit doesn't set BGCOLOR for an empty cell <td>. On adding some text in the empty <td> cell, bgcolor shows up. Could be related to the 'empty-cells' CSS property, which controls whether empty cells will display their background (and borders) or not.

IV Other browsers:
IE7: ok
FF3: ok
Opera9.24: ok

V Nightly tested: 31315
Comment 1 jasneet 2008-03-26 17:57:09 PDT
Created attachment 20111 [details]
screenshot
Comment 2 jasneet 2008-03-26 17:57:52 PDT
Created attachment 20112 [details]
reduction
Comment 3 Robert Blaut 2008-07-28 14:14:29 PDT
Confirmed.
Comment 4 Jon@Chromium 2008-11-18 12:26:38 PST
*** Bug 22336 has been marked as a duplicate of this bug. ***
Comment 5 Jon@Chromium 2008-11-18 12:30:10 PST
See Chromium bug http://code.google.com/p/chromium/issues/detail?id=1283 where this issue is messing up the graphs in Google Trends.
Comment 6 Ariel Kroszynski 2008-11-25 03:34:16 PST
(In reply to comment #5)
This issue has been worked-around in google trends.
Here is an html snippet reproducing the bug:

<html>
<style>
table.bar td {
    border-bottom: none;
    padding:0;
}
table.bar {
  padding:0;
  border-top: 1px solid #E8EEF7;
}
</style>

<h1> doesn't render bgcolor (defined for empty td)</h1>
<table cellspacing="0" width="60" height="4" class="bar"><tbody><tr><td bgcolor="#4684ee"/></tr></tbody></table>
<table cellspacing="0" width="62" height="4" class="bar"><tbody><tr><td bgcolor="#dc3912"/></tr></tbody></table>
<table cellspacing="0" width="61" height="4" class="bar"><tbody><tr><td bgcolor="#ff9900"/></tr></tbody></table>

<h1> doesn't render bgcolor (defined for tr tag)</h1>
<table cellspacing="0" width="60" height="4" class="bar"><tbody><tr bgcolor="#4684ee"><td/></tr></tbody></table>
<table cellspacing="0" width="62" height="4" class="bar"><tbody><tr bgcolor="#dc3912"><td/></tr></tbody></table>
<table cellspacing="0" width="61" height="4" class="bar"><tbody><tr bgcolor="#ff9900"><td/></tr></tbody></table>

<h1> renders bgcolor (defined for table tag)</h1>
<table cellspacing="0" width="60" height="4" class="bar" bgcolor="#4684ee"><tbody><tr><td/></tr></tbody></table>
<table cellspacing="0" width="62" height="4" class="bar" bgcolor="#dc3912"><tbody><tr><td/></tr></tbody></table>
<table cellspacing="0" width="61" height="4" class="bar" bgcolor="#ff9900"><tbody><tr><td/></tr></tbody></table>
</html>
Comment 7 Ahmad Saleem 2022-08-15 15:07:41 PDT
Created attachment 461644 [details]
Safari 15.6 differs from other browsers

I was not able to reproducing using the attached test case but I took the test case from Comment 06 and was able to reproduce the bug in <tr> case rather than <td> in Safari 15.6 on macOS 12.5 [Also reproducible in Safari TP 151] as can be seen from attached screenshot. All other browsers (Chrome Canary 106 and Firefox Nightly 105) render the border color perfectly fine. Thanks!

Link (Comment 06 - Test Case) - https://jsfiddle.net/q19bvzuo/show