Closed Bug 66147 Opened 24 years ago Closed 22 years ago

relatively positioned elements respond incorrectly to overflowing children

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: testcase, Whiteboard: [patch])

Attachments

(1 file, 1 obsolete file)

When I fixed bug 4519, I changed relatively positioned elements not to cause the
overflow area to expand.  However, the problem of expanding parents occurred
then only when the parent was relatively positioned.  This means there's a
second problem -- how relatively positioned elements respond to overflowing
children.  They shouldn't act differently from static-positioned ones, I don't
think...
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9
It could be that my fix to bug 4519 was wrong and this is the right place to fix
that bug.  I need to look at:
 * relatively positioned elements overflowing their views
 * relatively positioned elements in table cells, floats, and auto-sizing
absolutely positioned elements.

It could be that the reflow state needs 2 different overflow areas to handle
this correctly.
Reality check.  Moving out to 0.9.1.
Target Milestone: mozilla0.9 → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Target Milestone: mozilla0.9.2 → mozilla0.9.3
*** Bug 87046 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Target Milestone: mozilla0.9.9 → Future
This bug is the root of a lot of relative positioning problems, such as bug 76698.
No longer blocks: 76698
I claim that the combinedArea returned by
nsBlockFrameReflowContext::PlaceBlock() for relatively positioned child blocks
should include the relative positioning offset (i.e. the patch in bug 4519
should be undone). We use the combinedArea all over the place with the
expectation that it includes the actual child block's area.

I don't yet see where the combinedArea being used to compute the desired block
height, but I'll keep digging and see if we can't use the in-flow bounds area
instead.
Since we currently use the combined area for things like sizing table cells and
floaters (I think), this would cause problems since it would break the
fundamental idea of relative positioning, that the block only affects its
ancestors at its original position.  We shouldn't be using the combined area for
that -- we should have a better concept of a floater containing block that
expands to contain floaters -- and that probably requires a second type of area
(a maxFloaterExtents?).  I'm strongly suspicious of any use of the combined area
for layout (rather than painting).
This needs a lot more testing, but it fixes the basic problem and doesn't
regress your testcase in bug 4519.
Comment on attachment 75540 [details] [diff] [review]
Suggested fix: compute union of line bounds instead of their combinedAreas for NS_BLOCK_WRAP_SIZE

eh, what was I thinking. never mind
Attachment #75540 - Attachment is obsolete: true
The zip file includes screen shots of Mozilla's rendering (incorrect) and
Opera's rendering (correct)
Is there any chance that this bug could get some attention now that 1.0 has 
shipped?  Since I'm developing something which is affected by this bug 
(actually bug 131475), it would useful if anyone could suggest a likely 
timescale for this bug.
Is this bug related to bug 46983?
Keywords: testcase
just to state that this bug causes a lot of real world problems: unfortunately
most of the sites our company produces use Javascript scrollers for design
reasons and these scrollers work with absolute positioned divs inside relative
or absolute positioned divs with overflow: hidden.
This may destroy layouts on Mozilla and cause many other problems like
scrollbars where there is nothing to scroll and make Mozilla's performance
pretty bad.

It would be very nice if someone could take a look at this bug, thanks
ya - most major portals / sites are using some sort of dhtml scrollers.
Severity: normal → major
Markus, could you provide an example of a 'major portal / site' that is affected
by this bug, please?

Mikko: I think so - it probably depends on this one.
No longer blocks: 131475
Might this be fixed by my patch on bug 180711?  (I haven't tested since there
isn't an easily accessible testcase.)
Depends on: 180711
Whiteboard: [patch]
Target Milestone: Future → mozilla1.3alpha
Can we get this into 1.3b ?
Taking the hint from dbaron, I have made my test case more easily accessible:

http://www.tagnet.org/castlehill/mozillatest/css2_support_y.html

I've verified that this bug still exists in Mozilla 1.2.1
Blocks: 174149
No longer depends on: 174149
Fixed by the fix to bug 180711 (at least, the problem I originally described). 
I think some of the issues mentioned here are really (comment 19) bug 79315 or
(roc's patches) bug 172896.
Er, fixed.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 189946 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: