Open Bug 75061 Opened 24 years ago Updated 2 years ago

Layouts with COLSPAN overly constrain tables

Categories

(Core :: Layout: Tables, defect, P3)

x86
Linux
defect

Tracking

()

Future

People

(Reporter: gordo, Unassigned)

Details

(Keywords: html4, testcase, Whiteboard: [awd:tbl][HTML4-11.2.6])

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; 0.8.1)
BuildID:    2001040516

When laying out a complex table with colspan > 1 and
overlapping chunks, the layout engine forces some columns to
a minimum size. This makes the resulting table much larger,
and less readable.

Reproducible: Always
Steps to Reproduce:
1. Display page included below, resize the window smaller than
   the table.
2. repeat commenting out the row of  
3. add a SIZE=5% to each of the middle columns in the &nbsp row.
   this shows a more reasonable behavior (forced).

Actual Results:  The second, fifth, and eighth columns are forced down to a
minimal size, which makes the table cumbersome.

Expected Results:  The empty columns should be free floating in size so that the
table compacts reasonably.

<HTML><HEAD><STYLE TYPE="text/css">
  body { background: #FFFFFF; } table { background: #C0C0C0; }</STYLE></HEAD>
<BODY><FORM>
<TABLE COLS=6 WIDTH=100%>
<TR><TD COLSPAN=3><INPUT type="text" size=20></INPUT></TD>
  <TD COLSPAN=3><INPUT type="text" size=20></INPUT></TD></TR>
<TR><TD>Label Test 1</TD>
  <TD COLSPAN=2><INPUT type="text" size=12></INPUT></TD>
  <TD>Label Test 2</TD>
  <TD COLSPAN=2><INPUT type="text" size=12></INPUT></TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD>
  <TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
<!--
<TR><TD>&nbsp;</TD><TD WIDTH=8%>&nbsp;</TD><TD>&nbsp;</TD>
  <TD>&nbsp;</TD><TD WIDTH=8%>&nbsp;</TD><TD>&nbsp;</TD></TR>
-->
<TR><TD COLSPAN=2><INPUT type="text" size=12></INPUT></TD>
  <TD>Label XTest 1</TD>
  <TD COLSPAN=2><INPUT type="text" size=12></INPUT></TD>
  <TD>Label XTest 2</TD></TR>
</TABLE></FORM></BODY></HTML>
Component: Layout → HTMLTables
QA Contact: petersen → amar
Changing QA Contact
Dup of/related to bug 45486?
confirming the bug with win98, this bug is not a dupe of 45486, the fix in 
bug 45486 does not change the picture here.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: html4
Whiteboard: [awd:tbl]
Temporarily moving to future until a milestone can be assigned. 
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Whiteboard: [awd:tbl] → [awd:tbl][HTML4-11.2.6]
Just reconfirming this, it's still happening.

Here's another example.  This should create a table with two rows; the first has
four cells, each 100 pixels wide, and the second row should have 5 cells, offset
by 5 pixels from the first row, ending up like this:

|...|...|...|...|
|.|...|...|...|.|

The edge cells on the second row are half the width of all the other cells. 
This does not display properly as of 2002101508.  Instead, the rightmost cell in
BOTH rows is about 50 pixels wider than it should be.

<TABLE border="0" cellpadding="0" cellspacing="0" width="400">
	<TR>
		<TD colspan="2" width="100" bgcolor="#ff0000">a</TD>
		<TD colspan="2" width="100" bgcolor="#00ff00">b</TD>
		<TD colspan="2" width="100" bgcolor="#0000ff">c</TD>
		<TD colspan="2" width="100" bgcolor="#ffff00">d</TD>
	</TR>
	<TR>
		<TD colspan="1" width="50" bgcolor="#ff00ff">e</TD>
		<TD colspan="2" width="100" bgcolor="#00ffff">f</TD>
		<TD colspan="2" width="100" bgcolor="#bbbbbb">g</TD>
		<TD colspan="2" width="100" bgcolor="#444444">h</TD>
		<TD colspan="1" width="50" bgcolor="#666680">h</TD>
	</TR>
</TABLE>
Attached file Demos edited so far
Test case demonstrating the code in description but in HTML 4.01 strict with
CSS and also the table in comment #5. I added a button which append a colgroup
node in the table; with such node added, the layout sizes of cells is correct.

I also removed colspan="1" from both tables as this is the default number value
for colspan.

I also see/confirm a layout bug in XP Pro SP1, build 2003011713.
mass reassign to default owner
Assignee: karnaze → table
Status: ASSIGNED → NEW
QA Contact: amar → madhur
Target Milestone: Future → ---
Priority: -- → P3
Target Milestone: --- → Future
Keywords: testcase
the bug doesn't depend width settings and is very cleary vizualized
http://staff.csc.fi/pj/tmp/grafiikkaatyyleilla.html
I have a layout but that I think is the same bug.  It seems to me that except 
for the extra first row, these two table should layout more or less the same.  
Instead the "virtual" second column in the first table is not given any width, 
while it lays out reasonably in the second table.

<table border=1 style="background-color:#eeeeee;" bordercolor=black>
<tr><td colspan=2>ONE ONE ONE ONE ONE ONE ONE</td><td>TWO</td></tr>
<tr><td>THREE</td><td colspan=2>FOUR FOUR FOUR FOUR FOUR FOUR</td></tr>
</table>
<p>&nbsp;</p>
<table border=1 style="background-color:#eeeeee;" bordercolor=black>
<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td colspan=2>ONE ONE ONE ONE ONE ONE ONE</td><td>TWO</td></tr>
<tr><td>THREE</td><td colspan=2>FOUR FOUR FOUR FOUR FOUR FOUR</td></tr>
</table>
I think it may be from a core problem without any styling.  Introduced in firefox 3.+ Here is a simplistic code example that shows it's not working
correctly.  Run this same html against Firefix 2.+ and it works as you would
expect. 

Output should look like this:

ROOT
1 SUBDATA
1 1 SUBDATA
1 1 1 SUBDATA 

Firefox 3.+ showing this:

ROOT
1 SUBDATA
1 1   SUBDATA
1 1   1      SUBDATA


HTML EXAMPLE:

<HTML>
<Body>
<H3> COLSPAN - PROBLEM introduced in Firefox 3 </H3>
<TABLE>
<TR>
<TD COLSPAN=20>ROOT</TD>
</TR><TR>
<TD>1</TD>
<TD COLSPAN=20>SUBDATA</TD>
</TR><TR>
<TD>1</TD>
<TD>1</TD>
<TD COLSPAN=20>SUBDATA</TD>
</TR><TR>
<TD>1</TD>
<TD>1</TD>
<TD>1</TD>
<TD COLSPAN=20>SUBDATA</TD>
</TABLE>
</BODY>
</HTML>
Attached file testcase from comment
I created a new thread for Comment #10 - Bug 505655.
Assignee: layout.tables → nobody
QA Contact: madhur → layout.tables
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: