Closed Bug 267536 Opened 20 years ago Closed 20 years ago

clear:both ignores block formatting context / Rendering difference between PR1 & RC1

Categories

(Core :: Layout: Floats, defect)

1.7 Branch
All
Linux
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 266402

People

(Reporter: bugz, Unassigned)

References

()

Details

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041102 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-3)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041102 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-3)

There is a clear differnce in the float/clear rendering between PR1 and RC1 on
both linux and windows platforms. 

I appears that clear property is ignoring block formatting context and thus
elements are clearing elements they should not. I'm not a guru on CSS spec but
since this does not seem to be any layout/float related changes noted in the
changelog I assume this is a bug.

This was first noted on some non-public websites currently in development.

Reproducible: Always
Steps to Reproduce:






As well as the test case I have provided a two screenshots, one of FF PR1 and
one of FF RC1(Linux platform)
http://www.jagged.co.nz/cleartest/pr1.png
http://www.jagged.co.nz/cleartest/rc1.png
Component: Layout: Floats → General
Product: Browser → Firefox
Version: Trunk → 1.0 Branch
Severity: normal → major
Component: General → Layout: Floats
Flags: blocking-aviary1.0?
Product: Firefox → Browser
Version: 1.0 Branch → 1.7 Branch
It looks to me like the screenshot of RC1 (newer) matches what you describe in
the testcase as the correct behavior, but the screenshot of PR1 is incorrect.
Attached file testcase
test_case.html from reporter
I suspect any differences you noticed are the result of bug 148994.
Comment on attachment 164476 [details]
PR1 screenshot

This screenshot is clearly incorrect. So if this is the older one, and we have
fixed this, then this bug is invalid. If this is the newer one, then we have
regressed.
Right, I think I have got to the bottom of this, so I will document it all here.
Though, I would like someone to confirm this and mark this bug is invalid.

The confusion starts with Floats:
"A floated box is shifted to the left or right until its outer edge touches
<em>the containing block</em> edge or the outer edge of another float."

Which would lead you to think thats clear would effect the same context, BUT
"The 'clear' property does not consider floats ... in other <em>block formatting
contexts</em>."

Which at first read sounds like the parent block level element untell you
cross-reference the definition of "block formatting contexts" which is 
"floats, absolutely positioned elements, inline-blocks, table-cells, and
elements with 'overflow' other than 'visible'"

On further investigation I have found that RC1 seems to behave correctly ...
though unexpectedly. To prove this I have made and attached another test case.

Modifying the .content margin in pre-RC1 versions of FF show the buggy behaviour.

Adding overflow:hidden;, position:absolute; or floating the .content div causes
things too "return to normal". Though this is somewhat limiting, in alot of
respects, to the original buggy behaviour.

I know Murphy is waiting to unleash a torrent of IE related bugs on me when I
implement one of the above corrections to code on my website(s)
Attached file Second testcase
http://mycroft.mozdev.org/download.html

Another example spotted by someone in my office... 
So this bug is invalid (Hixie - yes, that "clearly incorrect" is the older one),
however, it's also a dupe of bug 266402 so it should be duped and then the other
one marked invalid

*** This bug has been marked as a duplicate of 266402 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Flags: blocking-aviary1.0?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: