Closed Bug 18644 Opened 22 years ago Closed 21 years ago

Table width miscalculations with NOWRAP and COLSPAN attributes


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






(Reporter: msw, Assigned: karnaze)



(Keywords: css2, testcase)


(8 files)

When viewing, resizing the window to 742
pixels on my system causes the table to the left to misfill.  The following
warning message is repeated several times while rendering the page:

WARNING: over allocated: 'totalAllocated <= maxWidth', file
../../../../../layout/html/table/src/BasicTableLayoutStrategy.cpp, line 316

Sizing the window to 741 pixels makes the table render properly.  You may need
to resize to a different width to see the problem.

I'm attaching a screenshot of the misrendered page.
The misrendering happens on as well, but the browser
window must be much wider (~1800 pixels).
This is wacky. The rows in the table containing the menu have gigantic colspans,
much bigger than the width of the table. This is apparently a kludge to
workaround some problem that doesn't seem to exist any more. I'll fix the web

I suppose this counts as a quirks mode bug since this doesn't happen with 4.6.

|      COLSPAN = 20    |
|         |            |
| <empty> | COLSPAN=19 |
|         |            |
The test case I added shows that this happens when the colspan on <TD> tags is
set to a number greater than the number of available columns.

The TD containing "At A Glance" has no columns after it so it can have at most,
colspan=1. if its colspan is set to 2 or more and the colspan of the row above
is set to more than the span of "At a Glance" then this problem occurs.

If the window is resized then the table collapses and displays the way it was
Target Milestone: M14
From my testcase:

This page has two tables on it.  The outer table's border will be
smaller on the right than the inner table's boarder when the browser is
at certain sizes.  The browser must be wide enought to not wrap the
text in table 2 R2 C1, and the width of the browser must be less than
the width of the inner table.

This behavior is NOT exhibited if Table 2 R1 C2 does not have the
NOWRAP attribute.

The browser needs to wrap Table 2 R2 C1 to allow Table 2 R1 C2 to fit onto the
screen.  It's almost as though R1 C2's space requirement isn't taken into
account when calculating when to wrap R2 C1.
Whiteboard: [TESTCASE]
Notice, also the horizontal scrollbar is missing when the inner table's bounds
extend past the area viewable by the browser.
Summary: table rendering problems → Table width miscalculations with NOWRAP and COLSPAN attributes
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Whiteboard: [TESTCASE]
Moving to M15.
Target Milestone: M14 → M15
Blocks: html4.01
Keywords: css2
COLSPAN is not technically part of CSS2, and rendering not part of HTML4, but
this problem is related to support for both, so adding relevant markers.
mass move to m16
Target Milestone: M15 → M16
Discovered a similar bug using <IMG> <a
(I hope this works, mozilla is doing strange things in this text box...)
Moving to M18.
Target Milestone: M16 → M18
This bug has been marked "future" because we have determined that it is not 
critical for netscape 6.0. If you feel this is an error, or if it blocks your 
work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
I would though consider this rather important, since this bug seems to affect
more pages than you expected...I have an example on one which absolutely loses
its design and everything. ;(

Please check if and its subpages (main seems to work
fine) fall into this bug.
Well I see this not happening anymore (i.e. can't reproduce with the testcases
anymore), it might have been fixed in conjunction with another bug...dare to
mark/verify this fixed? Reporter? Owner? Anyone?
I tested on Linux and compared with an old build. It looks like it got fixed
somehow.  Very nice!
bug 14929 colspan cell's should honour percentage width's
was fixed in september
marking as fixed
Closed: 21 years ago
Resolution: --- → FIXED
Tested on Win, Mac and Linux with 11/21 trunk builds. Verifying fixed.
You need to log in before you can comment on or make changes to this bug.