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)
commit8916d2192e465a303e303f159e531acf74f31a49
tree77f3a4e937f88e338ba9f384340f5b2a7031b054
parent41b7c3da939cb2efdf0bdac48c80a6ec4d8e0cfd
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: https://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