Should never be reached failure in WebCore::RenderFlexibleBox::alignChildren
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Aug 2016 14:45:43 +0000 (14:45 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Aug 2016 14:45:43 +0000 (14:45 +0000)
commit89758d905be87d90c63ece2593b3ca752fc524be
treefab9978bfc623896e1dbd623e6df5eb357274880
parent4a0a7f7b0ddeef55bae0bffed6e5c8b480eb0180
Should never be reached failure in WebCore::RenderFlexibleBox::alignChildren
https://bugs.webkit.org/show_bug.cgi?id=151591
<rdar://problem/27711829>

Reviewed by Darin Adler.

Source/WebCore:

The align-self and align-items CSS properties were originally defined in the
Flexbible Box specification. The new CSS Box Alignment specification tries
to generalize them so they can be used by other layout models, as it's  the
case of the GridLayout spec.

Since we have implemented the Grid Layout spec behind a runtime flag, we should
do the same with the new syntax of these properties.

Test: css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::alignChildren):

LayoutTests:

Test to verify that align-self and align-items CSS properties use the old
syntax when the Grid Layout feature is not enabled.

* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: Added.
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt [new file with mode: 0644]
LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp