margin-top/bottom has no effect for child nodes of flex items
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 00:03:56 +0000 (00:03 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 00:03:56 +0000 (00:03 +0000)
commit76e032cca5b9dd9d5dc2592d010cf56cd6840f73
treeeb5d0ad56bbd70319ba75429de75a7192c497716
parent2f83f18a74609c67c3b5f9ec2ae099f9423dbff7
margin-top/bottom has no effect for child nodes of flex items
https://bugs.webkit.org/show_bug.cgi?id=99923

Reviewed by Ojan Vafai.

Source/WebCore:

Flexitems, like table cells, shouldn't collapse margins.

Test: css3/flexbox/flexitem-no-margin-collapsing.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::MarginInfo::MarginInfo): Check to see if the parent is a flexible box.
We should always have a parent if we make it this far in the check.

LayoutTests:

Add a test to make sure we don't collapse margins in flex items.

* css3/flexbox/flexitem-no-margin-collapsing-expected.txt: Added.
* css3/flexbox/flexitem-no-margin-collapsing.html: Added.
* css3/flexbox/repaint.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flexitem-no-margin-collapsing-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/flexitem-no-margin-collapsing.html [new file with mode: 0644]
LayoutTests/css3/flexbox/repaint.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp