Closed Bug 240248 Opened 20 years ago Closed 19 years ago

Container with height:auto is not expanded when a child table expands

Categories

(Core :: Layout: Tables, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ilya.konstantinov+future, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Container with height:auto is not expanded when a child table expands (e.g. when
an inline image of unspecified height begins to load and we find out its
eventual size). When the table's size is known during the initial layouting, the
problem does not occur. In essense, it makes Mozilla's behavior uneven:
depending on items being in cache or not.

Example:
<div style="height:auto; overflow:auto; background-color:red;">
<table><tr><td>
<img src="blah.png"/>
</td></tr></table>
</div>

The image's size is unknown on initial layouting. After the image loads, the
TALBE's computed height grows to "image size + table's layout" but the
containing DIV's computed height doesn't grow from the initial few pixels it was
calculated to.

If the image isn't in a table, the image's new-known size *causes* the DIV to
expand, as expected.
Attached file Testcase
The testcase appends a random number to avoid Mozilla's cache. If Mozilla's
cache would take place, the testcase would work fine after the image would load
into cache for the first time.
This is only a problem with overflow:auto, right?  In that case, it's more
likely a scrollframe bug than a table bug...
There are two preconditions:
1. overflow:hidden|auto|scroll (but not 'visible')
   (Maybe this causes some "height doesn't matter" mode to trigger?)
2. The image must be in a table. 

If you say its more likely to be a problem with the overflow code, please
reassign as appropriate.
There are other bugs like this assigned to me. It's probably a dupe.

For now I'll mark it as dependent on bug 240276. The code rewriting there will
either fix this bug or make it much easier to fix.
wfm winxp 2004080708
Still broken on Linux 20040821
are you using a trunk or a branch build, I see that it is broken in a ff branch
build. If you used a branch build could you please retest with a trunk build?
yep this is still there I see it
Testcase fails for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8b2) Gecko/20050422 Firefox/1.0+
Testcase works for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8b2) Gecko/20050428 Firefox/1.0+
Resolved Fixed by bug 240276 & comment 4
Testcase fails for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8b2) Gecko/20050422 Firefox/1.0+
Testcase works for me with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.8b2) Gecko/20050428 Firefox/1.0+
Resolved Fixed by bug 240276 & comment 4
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: