space-evenly misbehaves with flexbox
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2017 20:48:20 +0000 (20:48 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 May 2017 20:48:20 +0000 (20:48 +0000)
commit66cd28a531580bf9bc2085e45a73b1998ea6b027
treee94474d6a30de2782130aa1307191a2e788dc4f7
parenta09e45bb771256b89e0587882d2006aad95d8f4c
space-evenly misbehaves with flexbox
https://bugs.webkit.org/show_bug.cgi?id=170445

Reviewed by David Hyatt.

Source/WebCore:

The CSS Box Alignment specification defines the <content-distribution>
set as some of the allowed values for the Content Distribution
properties, align-content and justify-content. The 'space-evenly' value
is not among the ones allowed for these properties according to the CSS
Flexible Box specification.

The CSS Flexbible box specification states that it must follow the CSS
Box Alignment specification, so this new value must be considered as
part of an upgraded level of the spec, which should be implemented
eventually.

Since we have already shipped an implementation of the new CSS Box
Alignment values for CSS Grid Layout, we need to implement it for
Flexbox as well.

No new tests, but several new test cases added.

* rendering/RenderFlexibleBox.cpp:
(WebCore::initialJustifyContentOffset):
(WebCore::justifyContentSpaceBetweenChildren):
(WebCore::initialAlignContentOffset):
(WebCore::alignContentSpaceBetweenChildren):

LayoutTests:

Added test cases for the 'space-evenly' value for align-content and justify-content.

* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt:
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/flexbox/flex-justify-content-expected.txt:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/multiline-align-content-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/resources/flexbox.css:
(.align-content-space-around):
(.justify-content-space-around):
* css3/flexbox/true-centering-expected.txt:
* css3/flexbox/true-centering.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt
LayoutTests/css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html
LayoutTests/css3/flexbox/css-properties-expected.txt
LayoutTests/css3/flexbox/css-properties.html
LayoutTests/css3/flexbox/flex-justify-content-expected.txt
LayoutTests/css3/flexbox/flex-justify-content.html
LayoutTests/css3/flexbox/multiline-align-content-expected.txt
LayoutTests/css3/flexbox/multiline-align-content-horizontal-column-expected.txt
LayoutTests/css3/flexbox/multiline-align-content-horizontal-column.html
LayoutTests/css3/flexbox/multiline-align-content.html
LayoutTests/css3/flexbox/resources/flexbox.css
LayoutTests/css3/flexbox/true-centering-expected.txt
LayoutTests/css3/flexbox/true-centering.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlexibleBox.cpp