[CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 May 2015 15:15:38 +0000 (15:15 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 May 2015 15:15:38 +0000 (15:15 +0000)
commit1842ed8310bce1aea869a249931ef7e151c0386c
tree1c3dfaa49aacdf7c82f4ae71a83b354aaf40564a
parentc5fd4e75e89b88b22fb445baa0d3c5686b41f8bc
[CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
https://bugs.webkit.org/show_bug.cgi?id=144443

Reviewed by Darin Adler.

Source/WebCore:

Upgrade the align-content property to the last CSS3 Box
Alignment specification. As it uses a different enumeration for
Positional and Distribution alignment, it implies some changes in
the FlexibleBox implementation.

Test: css3/parse-align-content.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::resolveContentAlignmentAuto):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::initialAlignContentOffset):
(WebCore::alignContentSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::alignFlexLines):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::resolveContentAlignment):
(WebCore::RenderStyle::resolveContentJustification):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

Tests to verify the align-content parsing logic. The new Box Alignment spec
requires some changes in the flexbox tests.

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/parse-align-content-expected.txt: Added.
* css3/parse-align-content.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/css-properties-expected.txt
LayoutTests/css3/flexbox/css-properties.html
LayoutTests/css3/parse-align-content-expected.txt [new file with mode: 0644]
LayoutTests/css3/parse-align-content.html [new file with mode: 0644]
LayoutTests/css3/parse-justify-content-expected.txt
LayoutTests/css3/parse-justify-content.html
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h