WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
21644
<td> width calculation skips through width:0 elements and uses the width of their descendants
https://bugs.webkit.org/show_bug.cgi?id=21644
Summary
<td> width calculation skips through width:0 elements and uses the width of t...
jasneet
Reported
2008-10-16 10:24:10 PDT
I Steps: Go to
http://alfredadamiec.blog.onet.pl/
II Issue: layout of header, left column, right column is wrong III Conclusion: <div> 's style property "width:0" is the cause of this problem. In IE/FF, because the <div>'s width is 0 and the next <td>'s width is set to "100%", the <div>'s container <td>'s width is rendered to 0. However in Chrome/Safari, the <div>'s container <td>'s width is rendered to a certain width. (equal to the <img>'s width) If change the style property "width" to a non-zero value like "width:100", then webkit behaves same with other browsers. IV Other Browsers: IE7: ok FF3: ok V Nightly tested: 37604
Attachments
reduced testcase
(1.26 KB, application/octet-stream)
2008-10-16 10:24 PDT
,
jasneet
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
jasneet
Comment 1
2008-10-16 10:24:59 PDT
Created
attachment 24397
[details]
reduced testcase
Tab Atkins
Comment 2
2011-10-21 21:23:38 PDT
Valid bug. I've included a properly reduced testcase at the end of this comment. When calculating the minimum width of a table cell, if a container is specified as zero-width, we're (incorrectly) skipping it and instead looking at the widths of its contents. If it has a non-zero width, we (correctly) honor that width. Reduced testcase: <!doctype html> <table> <tr> <td> foo <div style="width:0px"> <div class=block></div> </div> <td width=100%>wee! </table> <table> <tr> <td> foo <div style="width:1px"> <div class=block></div> </div> <td width=100%>wee! </table> <style> td { border: 1px solid gray; } .block { width: 50px; height: 50px; background: gray; } </style>
Ahmad Saleem
Comment 3
2022-08-30 04:50:19 PDT
I took the test case from
Comment 02
and changed it into JSFiddle: Link -
https://jsfiddle.net/a514Lfpg/show
On above, all browsers (Chrome Canary 107, Firefox Nightly 106 and Safari Technology Preview 152) are rendering this test case same and even the attached (RAR) test case is rendering same. I will mark this as "RESOLVED CONFIGURATION CHANGED". Please reopen with updated test case, if you think it is still not fixed. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug