Note: There are a few cases of duplicates in user autocompletion which are being worked on.

margin collapse fails if parent uses property clear

VERIFIED FIXED

Status

()

Core
Layout: Block and Inline
VERIFIED FIXED
12 years ago
12 years ago

People

(Reporter: Michael Ward, Assigned: roc)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050428 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050428 Firefox/1.0+

Part of bug 289480 hopefully this is a reduced test case

Reproducible: Always

Steps to Reproduce:
1. Open the testcase (will attach next)
2. 
3.

Actual Results:  
Notice whitespace between the green and black

Expected Results:  
No whitespace
(Reporter)

Comment 1

12 years ago
Created attachment 182140 [details]
(Hopefully) demonstraits bad behavior

According to the Acid 2 guide, the margins for .empty, .empty div, .smile, and
.smile div should all collapse. After this, .smile is moved down to clear the
floating nose. The .smile div doesn't get collapsed by us however
(Reporter)

Updated

12 years ago
Blocks: 289480

Updated

12 years ago
Keywords: testcase

Comment 2

12 years ago
assigning bug per bug 289480 comment 30
Assignee: nobody → roc
OK. I agree there's a bug ... it shouldn't be hard to fix.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 4

12 years ago
*** Bug 296648 has been marked as a duplicate of this bug. ***

Comment 5

12 years ago
Okay, I tested this rendering bug in both 1.0.4 and deer park alpha 1 (1.1a)...
and here's the result:
http://img260.echo.cx/img260/7892/schermafdruk65jk.png

It seems like this bug was fixed or not present in 1.0.4, but is still available
in 1.1a. Is this correct, does deer park contain an older version (or a
different branch) of gecko? Or am I losing my marbles? :)
(Reporter)

Comment 6

12 years ago
Interesting, 1.0.4 does not render the gap here, but does in bug 296648 and in
acid 2. 1.1a fails all three...
Created attachment 186279 [details] [diff] [review]
fix

I think this is just a silly error. Blocks with clearance are not necessarily
top-margin roots; in fact, the parent block does compute and manage the top
margins of a child with clearance and and any descendants whose margins
collapse with the top margin.
Attachment #186279 - Flags: superreview?(dbaron)
Attachment #186279 - Flags: review?(dbaron)
Comment on attachment 186279 [details] [diff] [review]
fix

Looks right, r+sr=dbaron.  Did you run Hixie's tests?
Attachment #186279 - Flags: superreview?(dbaron)
Attachment #186279 - Flags: superreview+
Attachment #186279 - Flags: review?(dbaron)
Attachment #186279 - Flags: review+
I reran Hixie's tests at
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse. With this patch,
we pass all but
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/024.html
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/044.html
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/049.html
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/057.html
http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/061.html
(Red lines show up in a few others due to rounding issues.) We already fail
those tests on trunk so I think this patch is good.
Comment on attachment 186279 [details] [diff] [review]
fix

layout fix that probably isn't 1.8-worthy except for the fact that it fixes an
issue in the Acid2 test.
Attachment #186279 - Flags: approval1.8b3?

Updated

12 years ago
Attachment #186279 - Flags: approval1.8b3? → approval1.8b3+
checked in
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.