auto margins on flexbox should allocate space in the flex direction
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 04:08:40 +0000 (04:08 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 04:08:40 +0000 (04:08 +0000)
commite68ec882e68afccede5f95192925d32c97011760
tree77f3a4e937f88e338ba9f384340f5b2a7031b054
parent9f2da2ddf7e70cd6cad7dfda304d596b27f51abe
auto margins on flexbox should allocate space in the flex direction
https://bugs.webkit.org/show_bug.cgi?id=83086

Reviewed by Ojan Vafai.

Source/WebCore:

Test: css3/flexbox/flex-flow-auto-margins.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
(WebCore):
(WebCore::RenderFlexibleBox::updateAutoMarginsInMainAxis):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Update the margins on the RenderBox *after* we do the final child layout.
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/flex-algorithm-with-margins-expected.txt:
* css3/flexbox/flex-algorithm-with-margins.html: Added safe centering test case.
* css3/flexbox/flex-flow-auto-margins-expected.txt: Added.
* css3/flexbox/flex-flow-auto-margins.html: Added.
* css3/flexbox/flex-pack.html: Fixed old results.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flex-algorithm-with-margins-expected.txt
LayoutTests/css3/flexbox/flex-algorithm-with-margins.html
LayoutTests/css3/flexbox/flex-flow-auto-margins-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/flex-flow-auto-margins.html [new file with mode: 0644]
LayoutTests/css3/flexbox/flex-pack.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h