relatively positioned boxes are clipped when overflow is visible

VERIFIED FIXED

Status

()

Core
Layout
P2
normal
VERIFIED FIXED
19 years ago
4 years ago

People

(Reporter: dbaron, Assigned: troy)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
relatively positioned boxes are clipped when overflow is visible.

(Also on this test, you should either do absolute positioning or completely
ignore it.  I'm not sure what's going on now.)

Updated

19 years ago
Status: NEW → ASSIGNED

Comment 1

19 years ago
Setting all current Open/Normal to M4.

Comment 2

19 years ago
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
*** Bug 2422 has been marked as a duplicate of this bug. ***
Extracted from 2422:

Here's some HTML that demonstrates the problem.

<body>
<div style="position:absolute; left:20px; top:20px; width:200px; border:solid
2px red; background-color:lightyellow">
Some text in a absolutely positoned DIV tag so we can test absolute positioning
of nested_
<div style="position:absolute; left:-20px; top:-20px; width:200px; border:solid
2px blue; background-color:white">
This is the text of the nested DIV element that's also absolutely
positioned</div>absolutely positioned DIV elements</div></body>

Updated

19 years ago
QA Contact: 4144 → 4110

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 5

19 years ago
This was fixed recently.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 6

19 years ago
Using 4/2 build, verified that positioned boxes overflow for div.contain boxes.

Comment 7

19 years ago
Verified cross platform on Win 95, Win NT, Win 98, Mac8.5 and Linux.
(Reporter)

Updated

19 years ago
Status: VERIFIED → REOPENED
(Reporter)

Comment 8

19 years ago
Using the 3/30 build, I'm only seeing the overflow on P.eight.  In P.seven, the
text should also overflow (but not the yellow) rather than be cut off.  So it
only seems to work if it's a child that overflows, not any descendant.

Also, there should also be overflow in the second, fifth, and seventh test
paragraphs, so verification of this bug should await fixing the regression
described in bug 4519.

Reopening bug.  However, if the issues described were fixed between 3/30 and 4/2
(although Kipp marked the bug fixed on 3/29), feel free to resolve it again.

Updated

19 years ago
Status: REOPENED → ASSIGNED

Updated

19 years ago
Resolution: FIXED → ---
(Reporter)

Comment 9

19 years ago
The latest problem in bug 2502 is a duplicate of this one.  Check that out too
if you think this is fixed.  (It may still have *other* problems, visible only
once this is fixed, so I'm not resolving as duplicate.)
(Reporter)

Comment 10

19 years ago
The text being cut off in P.seven is strange.  If I use PgDn to see it, I see
the whole line of text that is partly in the box (but not the ones below it).
If I scroll, the text is cut off at a line at or just below the bottom of the
box.  That line, I think, is the bottom of where the page was when the window
was refreshed for the first time with the bottom of the box above the top of
the page.
(Reporter)

Comment 11

19 years ago
Also, the text is also cut off in P.eight in

http://www.fas.harvard.edu/~dbaron/csstest/sec090302c
(Reporter)

Comment 12

19 years ago
Text is also being clipped in the upper left box in the second test in

http://www.fas.harvard.edu/~dbaron/csstest/sec1001c

Comment 13

19 years ago
There seems to be one bug left; the p.eight paragraph is being clipped;
everything else is working fine.

Updated

19 years ago
Assignee: kipp → troy
Status: ASSIGNED → NEW

Comment 14

19 years ago
The test labeled "p.eight" doesn't get its size set right during the setup of
the html reflow state. Here is a debug printout from
nsAbsoluteContainingBlock.cpp:

Area(p)(1)@0x819eb18: availSize=5745,1073741824 computed=5145,1290
desired=5145,1290

The block code is well trained to honor a computed-height and consequently
returns that height. The question is - why is the computed-height set at all!
The parent of p.eight is a div which has a fixed height, yet p.eight has no
specified height...

The InitAbsoluteConstraints code in nsHTMLReflowState is doing this, and since I
don't know why I'm giving this to troy to fix...
(Reporter)

Comment 15

19 years ago
Even if this is due to a sizing bug with the P.eight (which seems reasonable),
you still have a clipping problem, since inline boxes can (and should, by
default) overflow out of their parent block box.  There may be another bug on
that...
(Reporter)

Comment 16

19 years ago
Actually the height of p.eight itself is set by the positioning and should not
depend on its content.  Following the steps to compute heights, margins, and
offsets in http://www.w3.org/TR/REC-CSS2/visudet.html#abs-non-replaced-height :

1. nothing happens
2. bottom is set to 0, since height is auto
3. nothing happens
4. nothing happens
5. there is one auto left, height.  Thus height= containing block height -
top.  This is the computed value that should be returned for height.
6. ignored

Absolutely positioned elements are never sized based on the size of their
children.  (They could be sized based on their containing block's other
children, but that's a bit different.)

Thus I think this is a clipping bug.  Or am I missing something?
Blocks: 2502
Once this bug is fixed, reexamine bug 2502.
(Reporter)

Updated

19 years ago
Target Milestone: M15
(Reporter)

Comment 18

19 years ago
Removing Kipp's M15 marker, since this bug is important.
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 19

19 years ago
David's right it's a clipping problem.
(Assignee)

Comment 20

19 years ago
It's definitely a clipping problem. You can tell by where the yellow background
is painting: that represents the actual size of P.eight and the text should be
clipped to there as well.
(Assignee)

Comment 21

19 years ago
What I meant to say is that the text should not be clipped
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 22

19 years ago
Verified fixed, on all test pages mentioned.
Comment hidden (spam)
Comment hidden (spam)
You need to log in before you can comment on or make changes to this bug.