This commit is contained in:
karnaze%netscape.com 1999-08-03 23:13:39 +00:00
Родитель 55666e4c21
Коммит a17c117dc3
7 изменённых файлов: 345 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,161 @@
<html><body>
<div align=center>
<hr>
<p><b>Tables I, II, III, IV (cellpadding=0 cellspacing=5)</b></p>
<table border cellpadding=5 bgcolor=ffcc00>
<tr><td valign=top>
<table border cellpadding=0 cellspacing=5 bgcolor=ffffff>
<caption><nobr>Table I</nobr></caption>
<tr>
<td>1,1</td><td>1,2</td><td>1,3</td><td>1,4</td><td>1,5</td>
</tr>
<tr>
<td>2,1</td><td>2,2</td><td>2,3</td><td>2,4</td><td>2,5</td>
</tr>
<tr>
<td>3,1</td><td bgcolor=ffff66>3,2</td><td bgcolor=ffff66>3,3</td><td bgcolor=ffff66>3,4</td><td>3,5</td>
</tr>
</table>
</td><td valign=top>
<table border cellpadding=0 cellspacing=5 bgcolor=ffffff>
<caption><nobr>Table II</nobr></caption>
<tr>
<td>1,1</td><td colspan=2>1,2</td><td>1,4</td><td>1,5</td>
</tr>
<tr>
<td>2,1</td><td>2,2</td><td colspan=2>2,3</td><td>2,5</td>
</tr>
<tr>
<td>3,1</td><td bgcolor=ffff66>3,2</td><td bgcolor=ffff66>3,3</td><td bgcolor=ffff66>3,4</td><td>3,5</td>
</tr>
</table>
</td><td valign=top>
<table border cellpadding=0 cellspacing=5 bgcolor=ffffff>
<caption><nobr>Table III</nobr></caption>
<tr>
<td>1,1</td><td colspan=2>1,2</td><td>1,4</td><td>1,5</td>
</tr>
<tr>
<td>2,1</td><td>2,2</td><td colspan=2>2,3</td><td>2,5</td>
</tr>
<tr>
<td>3,1</td><td bgcolor=ffff66></td><td bgcolor=ffff66></td><td bgcolor=ffff66></td><td>3,5</td>
</tr>
</table>
</td><td valign=top>
<table border cellpadding=0 cellspacing=5 bgcolor=ffffff>
<caption><nobr>Table IV</nobr></caption>
<tr>
<td>1,1</td><td colspan=2>1,2</td><td>1,4</td><td>1,5</td>
</tr>
<tr>
<td>2,1</td><td>2,2</td><td colspan=2>2,3</td><td>2,5</td>
</tr>
</table>
</td></tr></table>
</div>
<BR>
<p>
This is a table colspan counting problem (IMHO).
The oversize &lt;TABLE> has two rows: one has *two* &lt;TD>
"requesting" total of 3 columns to span; second row has *one* &lt;TD>
"requesting" total of 3 columns to span. In other words, it's asking
for one more column than the max number of 'real' elements in a row.
Here's the simple case (first one shows the problem; the other adjusts the
colspan values and it works) (Dec 19 Nightly Win 95): All the elements in
the two tables below are width=auto (i.e., no width attribute specified).
</p><br>
<TABLE CELLPADDING="3" CELLSPACING="0" border="1">
<TR>
<TD colspan="2"><P><b>This is colspan=2</b></P></TD>
<TD>Blah Blah Blah Blah Blah Blah</TD>
</TR>
<TR>
<TD colspan="3">
<p><b>This is colspan=3</b> blah blah blah blah blah
--- why doesn't this cell span the table (5.0 win95 jun17)?
</p>
</TD>
</TR>
</TABLE>
<br><br>
<TABLE CELLPADDING="3" CELLSPACING="0" border="1">
<TR>
<TD colspan="1"><P><b>This is colspan=1</b></P></TD>
<TD>Blah Blah Blah Blah Blah Blah</TD>
</TR>
<TR>
<TD colspan="2">
<p><b>This is colspan=2</b> blah blah blah blah blah
--- this cell spans the table correctly.
</p>
</TD>
</TR>
</TABLE>
<br><p>
Here's the test case from bug #2645.
</p><p>
This test case (below) is derived from home.netscape.com (although
not much is left). [This was the table structure for "Autos ... Local
..." and the right-hand column ("ABCNews.com..."); added an extra column
to differentiate this example a bit more from the one above].
</p><p>
The basic problem is "competing colspan requests". The table has two rows,
both of which have COLSPAN requests. They are both asking for one more column
than the max number of 'real' elements in either row (i.e., both ask for total
of 5 but the maximum number of TD in either row is 4). This seems to confuse the
algorithm. ;) (Note: all the column elements in these two tables are width=fixed
except the TD with colspan=(4|3)).
</p>
<TABLE WIDTH=680 border>
<TR>
<td width=80>x</td>
<TD WIDTH=400 COLSPAN=2> this (colspan=2)</TD>
<TD WIDTH=2 BGCOLOR="#99cccc"> blue </TD>
<TD WIDTH=198> that </TD>
</TR>
<TR>
<td width=80>x</td>
<TD COLSPAN=4 BGCOLOR="#99cccc"> blue (colspan=4) --- doesn't span (5.0 win95 jun17)</TD>
</TR></TABLE>
<br><p>
Here's the same table but the 'colspan' values have been normalized.
</p>
<TABLE WIDTH=680 border>
<TR>
<td width=80>x</td>
<TD WIDTH=400 COLSPAN=1> this (colspan=1)</TD>
<TD WIDTH=2 BGCOLOR="#99cccc"> blue </TD>
<TD WIDTH=198> that </TD>
</TR>
<TR>
<td width=80>x</td>
<TD COLSPAN=3 BGCOLOR="#99cccc"> blue (colspan=3) --- spans correctly</TD>
</TR></TABLE>
<BR>
</body></html>

Просмотреть файл

@ -0,0 +1,20 @@
<html><head><style>
TABLE {table-layout:fixed; border: solid red 1px; width: 400}
TD {border: solid green 1px;}
TD.one {border: solid blue 1px; width: 300}
TD.two {border: solid blue 1px;}
</style></head><body>
<!-- this table should derive the width of the second column from what's
left over from the table width after subtracting the first column width -->
<TABLE><TR>
<TD class="one">What's New on WebDeveloper.com</TD>
<TD class="two">umm</TD>
</TR><TR>
<TD>blah blah blah blah blah blah blah blah blah blah blah blah</TD>
<TD>blah blah blah blah blah blah blah blah blah blah blah blah</TD>
</TR></TABLE>
</body></html>

Просмотреть файл

@ -0,0 +1,65 @@
<HTML><HEAD></HEAD>
<BODY>
<p><b>(1) Colspanning TD has fixed width equal to table width</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=340 COLSPAN=2>width=340 (same as table)</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(2) Colspanning TD has auto width</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD COLSPAN=2>no width attribute</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(3) Colspanning TD has width=100px</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=100 COLSPAN=2>width=100px</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(4) Colspanning TD has width=200px</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=200 COLSPAN=2>width=200px</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(5) Colspanning TD has width=100%</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=100% COLSPAN=2>width=100%</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
</center>
</BODY></HTML>

Просмотреть файл

@ -0,0 +1,65 @@
<HTML><HEAD></HEAD>
<BODY>
<p><b>(1) Colspanning TD has fixed width equal to table width</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=340 COLSPAN=2>width=340 (same as table)</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(2) Colspanning TD has auto width</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD COLSPAN=2>no width attribute</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(3) Colspanning TD has width=100px</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=100 COLSPAN=2>width=100px</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(4) Colspanning TD has width=200px</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=200 COLSPAN=2>width=200px</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
<p><b>(5) Colspanning TD has width=100%</b></p>
<TABLE BORDER=1 BGCOLOR=#ffffcc WIDTH=340 cellpadding=0 cellspacing=0>
<TR>
<TD WIDTH=100% COLSPAN=2>width=100%</TD>
</TR>
<TR>
<TD>Search for:</TD>
<TD>foo bar baz foo bar baz foo bar baz</TD>
</TR>
</TABLE>
</center>
</BODY></HTML>

Просмотреть файл

@ -0,0 +1,12 @@
<table>
<tr>
<td>
<table>
<tr>
<td>inside of table<img src="http://www.mozilla.org/images/mozilla-banner.gif" border=0 alt=""></td>
</tr>
</table>
</td>
<td>2nd row of outside table</td>
</tr>
</table>

Просмотреть файл

@ -0,0 +1,16 @@
<html>
<head>
</head>
<body>
<table><tr>
<td width="99%">This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. </td>
<td width="1%">This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell. This is some text to fill a table cell.</td>
</tr></table>
</body>
</html>

Просмотреть файл

@ -9,6 +9,7 @@ file://s:/mozilla/layout/html/tests/table/bugs/bug1224.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1261.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1262.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1296.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1302.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1318.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1430.html
file://s:/mozilla/layout/html/tests/table/bugs/bug1474.html
@ -28,11 +29,15 @@ file://s:/mozilla/layout/html/tests/table/bugs/bug2123.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2267.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2296.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2469.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2509.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2516.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2585.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2684.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2757.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2763.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2773.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2962.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2973.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2981-1.html
file://s:/mozilla/layout/html/tests/table/bugs/bug2981-2.html
file://s:/mozilla/layout/html/tests/table/bugs/bug3037-1.html
@ -57,6 +62,7 @@ file://s:/mozilla/layout/html/tests/table/bugs/bug641-1.html
file://s:/mozilla/layout/html/tests/table/bugs/bug641-2.html
file://s:/mozilla/layout/html/tests/table/bugs/bug6404.html
file://s:/mozilla/layout/html/tests/table/bugs/bug647.html
file://s:/mozilla/layout/html/tests/table/bugs/bug650.html
file://s:/mozilla/layout/html/tests/table/bugs/bug6933.html
file://s:/mozilla/layout/html/tests/table/bugs/bug709.html
file://s:/mozilla/layout/html/tests/table/bugs/bug7243.html