Closed Bug 180711 Opened 22 years ago Closed 22 years ago

position:relative blocks don't flow around floats

Categories

(Core :: Layout: Positioned, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: hs, Assigned: dbaron)

References

()

Details

(Keywords: testcase, Whiteboard: [patch])

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016

A DIV with style="position: relative;" following a table with align="left" is
displayed on top of the table instead of to its right.


Reproducible: Always

Steps to Reproduce:
1. Open the URL http://www.maffei.de/index.cfm?fuseaction=spektrum.main&navi=1,0,0
Actual Results:  
The content of some DIV element is written on top the content of some TABLE element.

Expected Results:  
Display the DIV content to the right of the TABLE content.

I don't know what the standards require here, but NS 4.78, IE, and Konqueror do
the same thing, while Mozilla (Moz. 1.0.1, Moz. 1.2b, NS 7.0) behaves differently.
Perhaps this is a duplicate of bug 118940.
Attached file minimal test case
Does this still break if the table is replaced with just a block?
Assignee: other → position
Status: UNCONFIRMED → NEW
Component: Layout → Layout: R & A Pos
Ever confirmed: true
Attached patch patch (obsolete) — Splinter Review
Stupid default parameters.  We should get rid of all of those at some point.
taking
Assignee: position → dbaron
Severity: normal → major
Priority: -- → P1
Target Milestone: --- → mozilla1.3alpha
Attachment #106671 - Flags: superreview?(kin)
Attachment #106671 - Flags: review?(bzbarsky)
(BTW, the value used in the CreateContinuingFrame case shouldn't matter, because
nsBlockFrame::Init copies all the block-range flags from the prev-in-flow.  And
using 0 means I don't need a line break.)
BTW, thanks (to the reporter) for the simple testcase for this rather serious bug.
I filed bug 180725 on getting rid of all those default parameters.
Status: NEW → ASSIGNED
see this on win2k.
platform -> all
Keywords: testcase
OS: Linux → All
Comment on attachment 106671 [details] [diff] [review]
patch

Heh.  Gotta love that comment-flatly-contradicts-code thing we had going... ;)
Attachment #106671 - Flags: review?(bzbarsky) → review+
Ahh, a silent removal of NS_BLOCK_WRAP_SIZE, I like that :-)
Comment on attachment 106671 [details] [diff] [review]
patch

Actually, this patch is wrong.	We need to go through ConstructBlock since we
need these state bits in some cases.
Attachment #106671 - Attachment is obsolete: true
Attachment #106671 - Flags: superreview?(kin)
Er, never NS_BLOCK_WRAP_SIZE, but sometimes NS_BLOCK_SPACE_MGR|NS_BLOCK_MARGIN_ROOT.
Attached patch patchSplinter Review
This is the corrected patch (see my previous comment).
Attachment #109197 - Flags: superreview?(roc+moz)
Attachment #109197 - Flags: review?(roc+moz)
Oops, I forgot the nsCSSFrameConstructor.h change in the patch.  But it's the
obvious -1/+2 change, so I won't bother with a new patch.
*** Bug 185175 has been marked as a duplicate of this bug. ***
Summary: DIV displayed on top of TABLE rather than to its right → position:relative blocks don't flow around floats
Comment on attachment 109197 [details] [diff] [review]
patch

r+sr=roc+moz

But, are you sure there are no cases left where area frames need to wrap their
overflowing children?
Attachment #109197 - Flags: superreview?(roc+moz)
Attachment #109197 - Flags: superreview+
Attachment #109197 - Flags: review?(roc+moz)
Attachment #109197 - Flags: review+
The places changed in the patch were the only ones that used the default
parameter, which I removed.  There are other things that use NS_BLOCK_WRAP_SIZE,
but that's a separate issue...  I'm not quite sure what you were asking, though.
I was worried about the call to NewAreaFrame from CreateContinuingFrame, but I
guess if the area frame has a continuation then it can't be wrapping its
content. Can it? Hmm.
See comment 7 about the call in CreateContinuingFrame.
Fix checked in to trunk, 2002-12-13 12:13 PDT.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.3alpha → mozilla1.3beta
It seems this fix made http://forum.fok.nl/showtopic.php/254505 look like a mess.
(bug 191291). All other browsers i've tested display the page well.
Opera, for instance, display both the url above as well as the original url in
this bug (180711) well.

Also all Mozilla and Netscape builds up till this fix also show the url in bug
191291 well.
There's no reason we should imitate a bug in WinIE for *only* 'position:
relative' blocks.  (Because we had this bug for so long, web sites probably
thought that it wasn't a bug.)
Well.. it's wrong to call it a "WinIE bug". Netscape 4.*, 6.*, 7.*, Mozilla 1.*
up untill this fix, in addition to Opera 6.11 and Konqueror 3.0.1 show it
approximately like MSIE. Mozilla builds from the past months is the only browser
that fails, actually.
*** Bug 82852 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: