flex-pack:center and flex-item-align:center should do true centering
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Feb 2012 23:01:40 +0000 (23:01 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Feb 2012 23:01:40 +0000 (23:01 +0000)
commit3a980b151a11e865408a382b7cc3e29f1979c59d
treee5fe9fe15068268f6e1ccb352a655241e313e1ab
parent79ec0ef7982b351a73f7c2ab670419cb7604aef5
flex-pack:center and flex-item-align:center should do true centering
https://bugs.webkit.org/show_bug.cgi?id=77385

Reviewed by Tony Chang.

Source/WebCore:

Also, removed passing totalPositiveFlexibility around. We don't
need to know about positive/negative flex once we run the flexing algorithm.
We used to need to know this in order to flex margins, but margins can
no longer be flexed.

Test: css3/flexbox/true-centering.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::initialPackingOffset):
(WebCore::packingSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):

LayoutTests:

* css3/flexbox/true-centering-expected.txt: Added.
* css3/flexbox/true-centering.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/true-centering-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/true-centering.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.h