Closed
Bug 194024
Opened 22 years ago
Closed 21 years ago
Table cell not calculated correctly if cellpadding=0 and border=(0 or undefined)
Categories
(Core :: Layout: Tables, defect, P2)
Core
Layout: Tables
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: matiasnu, Assigned: bernd_mozilla)
References
()
Details
(Keywords: testcase)
Attachments
(2 files, 2 obsolete files)
2.34 KB,
text/html
|
Details | |
1011 bytes,
patch
|
john
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021220 Chimera/0.6+ Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021220 Chimera/0.6+ The first example will render with too wide td's. (the green stuff) The second (the only change being border="1") will render as expected. If you swap the textarea for a 100% wide div, it works as expected too, so I'm not sure where this problem lies. The rendering problem occurs in 1.3b, Chimera (Moz1.0) on both Mac and PC Reproducible: Always Steps to Reproduce: 1.Click on the provided URL ( http://homepage.mac.com/matias/bugs/bug.html ) 2.Look at the first example 3.Look at the second example (which works as expected) Actual Results: The outer table renders with too wide td's Expected Results: Render it with td's with a witdh of 12px each (give or take a couple of pixels)
Comment 1•22 years ago
|
||
Seeing this with current trunk linux builds too...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•22 years ago
|
||
see this on winXP as well. I checked this on 1.2beta, 1.3 alpha and 1.3 beta. All render the table width incorrectly for the first testcase. IE renders the table width fine.
Keywords: testcase
Priority: -- → P2
Comment 3•22 years ago
|
||
reporter's 1st testcase provided as a bugzilla attachment (shows the bug)
Comment 4•22 years ago
|
||
reporter's 2nd testcase provided as a bugzilla attachment. (renders correctly)
Comment 5•21 years ago
|
||
Cell width is not calculated correctly if cellpadding=0 and border=0/undefined
Attachment #114927 -
Attachment is obsolete: true
Attachment #114928 -
Attachment is obsolete: true
Updated•21 years ago
|
Summary: The first example will render with too wide td's (the green stuff). The second (the only change being border="1") will render as expected. → Table cell not calculated correctly if cellpadding=0 and border=(0 or undefined)
Updated•21 years ago
|
Target Milestone: --- → Future
this bug can be fixed by backing out http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=BasicTableLayoutStrategy.cpp&root=/cvsroot&subdir=mozilla/layout/html/table/src&command=DIFF_FRAMESET&rev1=3.200&rev2=3.201
The problem here IMHO is that auto cells that contain only percentage based childs will still have a non zero desired width but can have a zero min-, fix- and pct width. Before checkin 201 we tried to avoid to assign widths to bogus columns at the end, this happens when a colspan at the end spans columns that are not populated with cells on other rows. Checkin 201 changed that behaviour trying to avoid to give widths to columns that contain empty cells like a <td></td>. As soon as the table cells have a padding or a border there minimum content width is > 0 and the situation will be as before the checkin. The attached patch expands that mechanism also to columns with a nonzero desired width. To go further with this patch I would need access to testcases that the checkin 201 tried to fix.
*** Bug 199526 has been marked as a duplicate of this bug. ***
Attachment #118849 -
Flags: superreview?(bzbarsky)
Attachment #118849 -
Flags: review?(jkeiser)
Updated•21 years ago
|
Attachment #118849 -
Flags: superreview?(bzbarsky) → superreview+
Comment 10•21 years ago
|
||
Comment on attachment 118849 [details] [diff] [review] patch You don't need to check GetMinWidth() or GetFixWidth() anymore, because desired width will always be bigger than either of them. Maybe the others too, but those two are the obvious ones I can see. The change is a good one though. Racking my brain I can't think of things this would fail on (because of the fact that we checked min width before already). Make darn sure this one goes through the regression tests though, please.
Attachment #118849 -
Flags: review?(jkeiser) → review+
Assignee | ||
Comment 11•21 years ago
|
||
fix and testcase checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•