Last Comment Bug 292295 - margin collapse fails if parent uses property clear
: margin collapse fails if parent uses property clear
Status: VERIFIED FIXED
: testcase
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
:
Mentors:
: 296648 (view as bug list)
Depends on:
Blocks: acid2
  Show dependency treegraph
 
Reported: 2005-04-28 21:16 PDT by Michael Ward
Modified: 2006-03-12 18:29 PST (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
(Hopefully) demonstraits bad behavior (949 bytes, text/html)
2005-04-28 21:22 PDT, Michael Ward
no flags Details
fix (2.63 KB, patch)
2005-06-14 19:15 PDT, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
dbaron: review+
dbaron: superreview+
asa: approval1.8b3+
Details | Diff | Review

Description Michael Ward 2005-04-28 21:16:51 PDT
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
Comment 1 Michael Ward 2005-04-28 21:22:32 PDT
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
Comment 2 Doug Wright 2005-04-29 05:48:51 PDT
assigning bug per bug 289480 comment 30
Comment 3 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-04-29 15:00:43 PDT
OK. I agree there's a bug ... it shouldn't be hard to fix.
Comment 4 Taral 2005-06-04 19:55:29 PDT
*** Bug 296648 has been marked as a duplicate of this bug. ***
Comment 5 RSpliet 2005-06-05 07:22:08 PDT
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? :)
Comment 6 Michael Ward 2005-06-05 11:57:39 PDT
Interesting, 1.0.4 does not render the gap here, but does in bug 296648 and in
acid 2. 1.1a fails all three...
Comment 7 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-06-14 19:15:33 PDT
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.
Comment 8 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2005-06-14 20:30:34 PDT
Comment on attachment 186279 [details] [diff] [review]
fix

Looks right, r+sr=dbaron.  Did you run Hixie's tests?
Comment 9 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-06-14 21:01:45 PDT
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 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-06-14 21:03:54 PDT
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.
Comment 11 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-06-15 19:55:36 PDT
checked in
Comment 12 Marek Stępień [:marcoos, inactive] 2005-06-16 07:38:21 PDT
Verified.

Note You need to log in before you can comment on or make changes to this bug.