Closed Bug 220653 Opened 21 years ago Closed 21 years ago

Wrong total cell width with table-layout: fixed + colspan + cellspacing

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cbro, Assigned: bernd_mozilla)

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916

Using a fixed layout table and TD + COLSPAN, the size of the cells are wrongly
calculated. Looking at the code, it looks like the width of the table available
to cells is decreased by (numColumns * cellspacing), without taking the colspan
variable into account. This leads (as showned in the test case) to the total
width of cells < width of table.
Setting CELLSPACING=0 works around the problem.

IE and KHTML do not show the problem. Problem occurs in 1.4 linux and 1.5rc2 in
windows.

Reproducible: Always

Steps to Reproduce:
1. Set the table style to "table-layout: fixed"
2. Set the table's CELLSPACING > 0
3. Use COLSPAN > 1 on TD level

Actual Results:  
Total of cells width < Table width

Expected Results:  
Cells should be flowed as to fill the table
Cant you attach a testcase? I get a "401 Authorization Required" on the URL.
Attached file Test Case
mine
Assignee: table → bernd_mozilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attached patch patch (obsolete) — Splinter Review
we need one more cellspacing
Attachment #132357 - Attachment is obsolete: true
Comment on attachment 133704 [details] [diff] [review]
one more cellspacing please

Boris could you review again
Attachment #133704 - Flags: review?(bzbarsky)
Comment on attachment 133704 [details] [diff] [review]
one more cellspacing please

Where is mCellSpacingTotal declared?  Is it even a member?  If no, call it
cellSpacingTotal or something...

r=bzbarsky with that sorted out.
Attachment #133704 - Flags: review?(bzbarsky) → review+
the patch has been checked in on Oct. 21th
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.

Attachment

General

Creator:
Created:
Updated:
Size: