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
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
assigning bug per bug 289480 comment 30
OK. I agree there's a bug ... it shouldn't be hard to fix.
*** Bug 296648 has been marked as a duplicate of this bug. ***
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? :)
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.
12 years ago
Comment on attachment 186279 [details] [diff] [review] fix Looks right, r+sr=dbaron. Did you run Hixie's tests?
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.