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