haikuwebkit/LayoutTests/css3/parse-align-content.html

329 lines
14 KiB
HTML
Raw Permalink Normal View History

[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<!DOCTYPE html>
<style>
#alignContentAuto {
align-content: auto;
}
#alignContentBaseline {
align-content: baseline;
}
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
#alignContentFirstBaseline {
align-content: first baseline;
}
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
#alignContentLastBaseline {
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
align-content: last baseline;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
#alignContentSpaceBetween {
align-content: space-between;
}
#alignContentSpaceAround {
align-content: space-around;
}
#alignContentSpaceEvenly {
align-content: space-evenly;
}
#alignContentStretch {
align-content: stretch;
}
#alignContentStart {
align-content: start;
}
#alignContentEnd {
align-content: end;
}
#alignContentCenter {
align-content: center;
}
#alignContentFlexStart {
align-content: flex-start;
}
#alignContentFlexEnd {
align-content: flex-end;
}
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
#alignContentUnsafeEnd {
align-content: unsafe end ;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
#alignContentUnsafeCenter {
align-content: unsafe center ;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
#alignContentUnsafeFlexStart {
align-content: unsafe flex-start;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
#alignContentSafeFlexEnd {
align-content: safe flex-end;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
<!-- Invalid CSS cases -->
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
#alignContentSpaceBetweenLeft {
align-content: space-between left;
}
#alignContentSpaceAroundCenter {
align-content: space-around center;
}
#alignContentSpaceEvenlyRight {
align-content: space-evenly right;
}
#alignContentStretchStartSafe {
align-content: stretch start safe;
}
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe' https://bugs.webkit.org/show_bug.cgi?id=152251 Source/WebCore: Reviewed by Darin Adler. The 'True' Overflow Alignment keyword is now defined in the Box Alignment specification as 'Unsafe'. This patch applies the required changes in the CSS parsing logic, as well Grid Layout specific codebase, so it complies with the last version of the spec. No new tests, no change in functionality. * css/CSSParser.cpp: (WebCore::isAlignmentOverflowKeyword): (WebCore::CSSParser::parseItemPositionOverflowPosition): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator OverflowAlignment): * css/CSSValueKeywords.in: * rendering/RenderGrid.cpp: (WebCore::computeOverflowAlignmentOffset): * rendering/style/RenderStyleConstants.h: LayoutTests: The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting layout tests using such keyword. Reviewed by Darin Adler. * css3/overwrite-content-alignment-expected.txt: * css3/overwrite-content-alignment.html: * css3/overwrite-self-alignment-expected.txt: * css3/overwrite-self-alignment.html: * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-align-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css/parse-justify-items-expected.txt: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/170411@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 12:11:56 +00:00
#alignContentSpaceAroundEndUnsafe {
align-content: space-around end unsafe;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
#alignContentSpaceEvenlyFlexStartSafe {
align-content: space-evenly flex-start safe;
}
#alignContentSpaceBetweenSafe {
align-content: space-between safe;
}
#alignContentSpaceBetweenStretch {
align-content: space-between stretch;
}
#alignContentSafe {
align-content: safe;
}
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe' https://bugs.webkit.org/show_bug.cgi?id=152251 Source/WebCore: Reviewed by Darin Adler. The 'True' Overflow Alignment keyword is now defined in the Box Alignment specification as 'Unsafe'. This patch applies the required changes in the CSS parsing logic, as well Grid Layout specific codebase, so it complies with the last version of the spec. No new tests, no change in functionality. * css/CSSParser.cpp: (WebCore::isAlignmentOverflowKeyword): (WebCore::CSSParser::parseItemPositionOverflowPosition): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator OverflowAlignment): * css/CSSValueKeywords.in: * rendering/RenderGrid.cpp: (WebCore::computeOverflowAlignmentOffset): * rendering/style/RenderStyleConstants.h: LayoutTests: The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting layout tests using such keyword. Reviewed by Darin Adler. * css3/overwrite-content-alignment-expected.txt: * css3/overwrite-content-alignment.html: * css3/overwrite-self-alignment-expected.txt: * css3/overwrite-self-alignment.html: * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-align-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css/parse-justify-items-expected.txt: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/170411@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 12:11:56 +00:00
#alignContentRightSafeUnsafe {
align-content: right safe unsafe;
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
}
#alignContentCenterLeft {
align-content: center left;
}
</style>
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
<p>Test that setting and getting align-content works as expected</p>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentAuto"></div>
<div id="alignContentBaseline"></div>
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
<div id="alignContentFirstBaseline"></div>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentLastBaseline"></div>
<div id="alignContentSpaceBetween"></div>
<div id="alignContentSpaceAround"></div>
<div id="alignContentSpaceEvenly"></div>
<div id="alignContentStretch"></div>
<div id="alignContentStart"></div>
<div id="alignContentEnd"></div>
<div id="alignContentCenter"></div>
<div id="alignContentFlexStart"></div>
<div id="alignContentFlexEnd"></div>
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
<div id="alignContentUnsafeEnd"></div>
<div id="alignContentUnsafeCenter"></div>
<div id="alignContentSafeSelfEnd"></div>
<div id="alignContentSafeSelfStart"></div>
<div id="alignContentUnsafeFlexStart"></div>
<div id="alignContentSafeFlexEnd"></div>
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe' https://bugs.webkit.org/show_bug.cgi?id=152251 Source/WebCore: Reviewed by Darin Adler. The 'True' Overflow Alignment keyword is now defined in the Box Alignment specification as 'Unsafe'. This patch applies the required changes in the CSS parsing logic, as well Grid Layout specific codebase, so it complies with the last version of the spec. No new tests, no change in functionality. * css/CSSParser.cpp: (WebCore::isAlignmentOverflowKeyword): (WebCore::CSSParser::parseItemPositionOverflowPosition): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator OverflowAlignment): * css/CSSValueKeywords.in: * rendering/RenderGrid.cpp: (WebCore::computeOverflowAlignmentOffset): * rendering/style/RenderStyleConstants.h: LayoutTests: The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting layout tests using such keyword. Reviewed by Darin Adler. * css3/overwrite-content-alignment-expected.txt: * css3/overwrite-content-alignment.html: * css3/overwrite-self-alignment-expected.txt: * css3/overwrite-self-alignment.html: * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-align-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css/parse-justify-items-expected.txt: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/170411@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 12:11:56 +00:00
<div id="alignContentEndUnsafe"></div>
<div id="alignContentCenterUnsafe"></div>
<div id="alignContentFlexStartUnsafe"></div>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentFlexEndSafe"></div>
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentSpaceBetweenLeft"></div>
<div id="alignContentSpaceAroundCenter"></div>
<div id="alignContentSpaceEvenlyRight"></div>
<div id="alignContentStretchStartSafe"></div>
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe' https://bugs.webkit.org/show_bug.cgi?id=152251 Source/WebCore: Reviewed by Darin Adler. The 'True' Overflow Alignment keyword is now defined in the Box Alignment specification as 'Unsafe'. This patch applies the required changes in the CSS parsing logic, as well Grid Layout specific codebase, so it complies with the last version of the spec. No new tests, no change in functionality. * css/CSSParser.cpp: (WebCore::isAlignmentOverflowKeyword): (WebCore::CSSParser::parseItemPositionOverflowPosition): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator OverflowAlignment): * css/CSSValueKeywords.in: * rendering/RenderGrid.cpp: (WebCore::computeOverflowAlignmentOffset): * rendering/style/RenderStyleConstants.h: LayoutTests: The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting layout tests using such keyword. Reviewed by Darin Adler. * css3/overwrite-content-alignment-expected.txt: * css3/overwrite-content-alignment.html: * css3/overwrite-self-alignment-expected.txt: * css3/overwrite-self-alignment.html: * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-align-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css/parse-justify-items-expected.txt: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/170411@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 12:11:56 +00:00
<div id="alignContentSpaceAroundEndUnsafe"></div>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentSpaceEvenlyFlexStartSafe"></div>
<div id="alignContentSpaceBetweenSafe"></div>
<div id="alignContentSpaceBetweenStretch"></div>
<div id="alignContentSafe"></div>
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe' https://bugs.webkit.org/show_bug.cgi?id=152251 Source/WebCore: Reviewed by Darin Adler. The 'True' Overflow Alignment keyword is now defined in the Box Alignment specification as 'Unsafe'. This patch applies the required changes in the CSS parsing logic, as well Grid Layout specific codebase, so it complies with the last version of the spec. No new tests, no change in functionality. * css/CSSParser.cpp: (WebCore::isAlignmentOverflowKeyword): (WebCore::CSSParser::parseItemPositionOverflowPosition): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator OverflowAlignment): * css/CSSValueKeywords.in: * rendering/RenderGrid.cpp: (WebCore::computeOverflowAlignmentOffset): * rendering/style/RenderStyleConstants.h: LayoutTests: The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting layout tests using such keyword. Reviewed by Darin Adler. * css3/overwrite-content-alignment-expected.txt: * css3/overwrite-content-alignment.html: * css3/overwrite-self-alignment-expected.txt: * css3/overwrite-self-alignment.html: * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-align-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css/parse-justify-items-expected.txt: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/170411@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-12-15 12:11:56 +00:00
<div id="alignContentRightSafeUnsafe"></div>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<div id="alignContentCenterLeft"></div>
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="resources/alignment-parsing-utils-th.js"></script>
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
<script>
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
test(function() {
var alignContentAuto = document.getElementById("alignContentAuto");
checkValues(alignContentAuto, "alignContent", "align-content", "", "normal");
var alignContentBaseline = document.getElementById("alignContentBaseline");
checkValues(alignContentBaseline, "alignContent", "align-content", "", "baseline");
var alignContentLastBaseline = document.getElementById("alignContentFirstBaseline");
checkValues(alignContentLastBaseline, "alignContent", "align-content", "", "baseline");
var alignContentLastBaseline = document.getElementById("alignContentLastBaseline");
checkValues(alignContentLastBaseline, "alignContent", "align-content", "", "last baseline");
var alignContentSpaceBetween = document.getElementById("alignContentSpaceBetween");
checkValues(alignContentSpaceBetween, "alignContent", "align-content", "", "space-between");
var alignContentSpaceAround = document.getElementById("alignContentSpaceAround");
checkValues(alignContentSpaceAround, "alignContent", "align-content", "", "space-around");
var alignContentSpaceEvenly = document.getElementById("alignContentSpaceEvenly");
checkValues(alignContentSpaceEvenly, "alignContent", "align-content", "", "space-evenly");
var alignContentStretch = document.getElementById("alignContentStretch");
checkValues(alignContentStretch, "alignContent", "align-content", "", "stretch");
var alignContentStart = document.getElementById("alignContentStart");
checkValues(alignContentStart, "alignContent", "align-content", "", "start");
var alignContentEnd = document.getElementById("alignContentEnd");
checkValues(alignContentEnd, "alignContent", "align-content", "", "end");
var alignContentCenter = document.getElementById("alignContentCenter");
checkValues(alignContentCenter, "alignContent", "align-content", "", "center");
var alignContentFlexStart = document.getElementById("alignContentFlexStart");
checkValues(alignContentFlexStart, "alignContent", "align-content", "", "flex-start");
var alignContentFlexEnd = document.getElementById("alignContentFlexEnd");
checkValues(alignContentFlexEnd, "alignContent", "align-content", "", "flex-end");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
var alignContentUnsafeEnd = document.getElementById("alignContentUnsafeEnd");
checkValues(alignContentUnsafeEnd, "alignContent", "align-content", "", "unsafe end");
var alignContentUnsafeCenter = document.getElementById("alignContentUnsafeCenter");
checkValues(alignContentUnsafeCenter, "alignContent", "align-content", "", "unsafe center");
var alignContentUnsafeFlexStart = document.getElementById("alignContentUnsafeFlexStart");
checkValues(alignContentUnsafeFlexStart, "alignContent", "align-content", "", "unsafe flex-start");
var alignContentSafeFlexEnd = document.getElementById("alignContentSafeFlexEnd");
checkValues(alignContentSafeFlexEnd, "alignContent", "align-content", "", "safe flex-end");
}, "Test getting align-content values previously set through CSS.");
test(function() {
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentEndUnsafe = document.getElementById("alignContentEndUnsafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentEndUnsafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentCenterUnsafe = document.getElementById("alignContentCenterUnsafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentCenterUnsafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentFlexStartUnsafe = document.getElementById("alignContentFlexStartUnsafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentFlexStartUnsafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentFlexEndSafe = document.getElementById("alignContentFlexEndSafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentFlexEndSafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceBetweenLeft = document.getElementById("alignContentSpaceBetweenLeft");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentSpaceBetweenLeft, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceAroundCenter = document.getElementById("alignContentSpaceAroundCenter");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentSpaceAroundCenter, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceEvenlyRight = document.getElementById("alignContentSpaceEvenlyRight");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentSpaceEvenlyRight, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentStretchStartSafe = document.getElementById("alignContentStretchStartSafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentStretchStartSafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceAroundEndUnsafe = document.getElementById("alignContentSpaceAroundEndUnsafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentSpaceAroundEndUnsafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceEvenlyFlexStartSafe = document.getElementById("alignContentSpaceEvenlyFlexStartSafe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(alignContentSpaceEvenlyFlexStartSafe, "alignContent", "align-content", "", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
var alignContentSpaceBetweenSafe = document.getElementById("alignContentSpaceBetweenSafe");
checkValues(alignContentSpaceBetweenSafe, "alignContent", "align-content", "", "normal");
var alignContentSpaceBetweenStretch = document.getElementById("alignContentSpaceBetweenStretch");
checkValues(alignContentSpaceBetweenStretch, "alignContent", "align-content", "", "normal");
var alignContentSafe = document.getElementById("alignContentSafe");
checkValues(alignContentSafe, "alignContent", "align-content", "", "normal");
var alignContentRightSafeUnsafe = document.getElementById("alignContentRightSafeUnsafe");
checkValues(alignContentRightSafeUnsafe, "alignContent", "align-content", "", "normal");
var alignContentCenterLeft = document.getElementById("alignContentCenterLeft");
checkValues(alignContentCenterLeft, "alignContent", "align-content", "", "normal");
}, "Test setting invalid values to align-content through CSS.");
test(function() {
element = document.createElement("div");
document.body.appendChild(element);
checkValues(element, "alignContent", "align-content", "", "normal");
}, "Test initial value of align-content through JS");
test(function() {
element = document.createElement("div");
document.body.appendChild(element);
element.style.alignContent = "center";
checkValues(element, "alignContent", "align-content", "center", "center");
element.style.alignContent = "unsafe start";
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkValues(element, "alignContent", "align-content", "unsafe start", "unsafe start");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
element.style.alignContent = "safe flex-end";
checkValues(element, "alignContent", "align-content", "safe flex-end", "safe flex-end");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
element.style.alignContent = "unsafe end";
checkValues(element, "alignContent", "align-content", "unsafe end", "unsafe end");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
[css-align] The 'baseline' value must be invalid for the 'justify-content' property https://bugs.webkit.org/show_bug.cgi?id=181794 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Adapted the test cases using <baseline-position> keywords to the new CSS syntax. Imported the CSS/support folder. * resources/import-expectations.json: * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: (checkPlaceShorhand): (checkPlaceShorhandLonghands): * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: * web-platform-tests/css/support/1x1-green.png: Added. * web-platform-tests/css/support/1x1-lime.png: Added. * web-platform-tests/css/support/1x1-maroon.png: Added. * web-platform-tests/css/support/1x1-navy.png: Added. * web-platform-tests/css/support/1x1-red.png: Added. * web-platform-tests/css/support/1x1-white.png: Added. * web-platform-tests/css/support/60x60-gg-rr.png: Added. * web-platform-tests/css/support/60x60-green.png: Added. * web-platform-tests/css/support/60x60-red.png: Added. * web-platform-tests/css/support/OWNERS: Added. * web-platform-tests/css/support/README: Added. * web-platform-tests/css/support/a-green.css: Added. (.a): * web-platform-tests/css/support/alignment.css: Added. (.alignSelfAuto): (.alignSelfNormal): (.alignSelfStretch): (.alignSelfStart): (.alignSelfEnd): (.alignSelfCenter): (.alignSelfRight): (.alignSelfLeft): (.alignSelfFlexStart): (.alignSelfFlexEnd): (.alignSelfSelfStart): (.alignSelfSelfEnd): (.alignSelfSafeCenter): (.alignSelfUnsafeCenter): (.alignSelfSafeEnd): (.alignSelfUnsafeEnd): (.alignSelfSafeSelfEnd): (.alignSelfUnsafeSelfEnd): (.alignSelfSafeSelfStart): (.alignSelfUnsafeSelfStart): (.alignSelfSafeRight): (.alignSelfUnsafeRight): (.alignSelfSafeLeft): (.alignSelfUnsafeLeft): (.alignSelfSafeFlexEnd): (.alignSelfUnsafeFlexEnd): (.alignSelfSafeFlexStart): (.alignSelfUnsafeFlexStart): (.alignSelfBaseline): (.alignSelfFirstBaseline): (.alignSelfLastBaseline): (.alignItemsAuto): (.alignItemsNormal): (.alignItemsStretch): (.alignItemsStart): (.alignItemsCenter): (.alignItemsEnd): (.alignItemsLeft): (.alignItemsRight): (.alignItemsFlexStart): (.alignItemsFlexEnd): (.alignItemsSelfStart): (.alignItemsSelfEnd): (.alignItemsSafeCenter): (.alignItemsUnsafeCenter): (.alignItemsSafeEnd): (.alignItemsUnsafeEnd): (.alignItemsSafeSelfEnd): (.alignItemsUnsafeSelfEnd): (.alignItemsSafeSelfStart): (.alignItemsUnsafeSelfStart): (.alignItemsSafeRight): (.alignItemsUnsafeRight): (.alignItemsSafeLeft): (.alignItemsUnsafeLeft): (.alignItemsSafeFlexEnd): (.alignItemsUnsafeFlexEnd): (.alignItemsSafeFlexStart): (.alignItemsUnsafeFlexStart): (.alignItemsBaseline): (.alignItemsFirstBaseline): (.alignItemsLastBaseline): (.alignContentBaseline): (.alignContentLastBaseline): (.alignContentStart): (.alignContentEnd): (.alignContentCenter): (.alignContentLeft): (.alignContentRight): (.alignContentFlexStart): (.alignContentFlexEnd): (.alignContentSpaceBetween): (.alignContentSpaceAround): (.alignContentSpaceEvenly): (.alignContentStretch): (.alignContentSafeCenter): (.alignContentUnsafeCenter): (.alignContentSafeEnd): (.alignContentUnsafeEnd): (.alignContentSafeRight): (.alignContentUnsafeRight): (.alignContentSafeLeft): (.alignContentUnsafeLeft): (.alignContentSafeFlexEnd): (.alignContentUnsafeFlexEnd): (.alignContentSafeFlexStart): (.alignContentUnsafeFlexStart): (.alignContentFirstBaseline): (.justifySelfAuto): (.justifySelfNormal): (.justifySelfStretch): (.justifySelfStart): (.justifySelfCenter): (.justifySelfEnd): (.justifySelfRight): (.justifySelfLeft): (.justifySelfFlexStart): (.justifySelfFlexEnd): (.justifySelfSelfStart): (.justifySelfSelfEnd): (.justifySelfSafeCenter): (.justifySelfUnsafeCenter): (.justifySelfSafeEnd): (.justifySelfUnsafeEnd): (.justifySelfSafeSelfEnd): (.justifySelfUnsafeSelfEnd): (.justifySelfSafeSelfStart): (.justifySelfUnsafeSelfStart): (.justifySelfSafeRight): (.justifySelfUnsafeRight): (.justifySelfSafeLeft): (.justifySelfUnsafeLeft): (.justifySelfSafeFlexEnd): (.justifySelfUnsafeFlexEnd): (.justifySelfSafeFlexStart): (.justifySelfUnsafeFlexStart): (.justifySelfBaseline): (.justifySelfFirstBaseline): (.justifySelfLastBaseline): (.justifyItemsAuto): (.justifyItemsNormal): (.justifyItemsStretch): (.justifyItemsStart): (.justifyItemsCenter): (.justifyItemsEnd): (.justifyItemsLeft): (.justifyItemsRight): (.justifyItemsFlexStart): (.justifyItemsFlexEnd): (.justifyItemsSelfStart): (.justifyItemsSelfEnd): (.justifyItemsLegacy): (.justifyItemsLegacyLeft): (.justifyItemsLegacyCenter): (.justifyItemsLegacyRight): (.justifyItemsLeftLegacy): (.justifyItemsCenterLegacy): (.justifyItemsRightLegacy): (.justifyItemsSafeCenter): (.justifyItemsUnsafeCenter): (.justifyItemsSafeEnd): (.justifyItemsUnsafeEnd): (.justifyItemsSafeSelfEnd): (.justifyItemsUnsafeSelfEnd): (.justifyItemsSafeSelfStart): (.justifyItemsUnsafeSelfStart): (.justifyItemsSafeRight): (.justifyItemsUnsafeRight): (.justifyItemsSafeLeft): (.justifyItemsUnsafeLeft): (.justifyItemsSafeFlexEnd): (.justifyItemsUnsafeFlexEnd): (.justifyItemsSafeFlexStart): (.justifyItemsUnsafeFlexStart): (.justifyItemsTest): (.justifyItemsBaseline): (.justifyItemsFirstBaseline): (.justifyItemsLastBaseline): (.justifyContentBaseline): (.justifyContentLastBaseline): (.justifyContentStart): (.justifyContentEnd): (.justifyContentCenter): (.justifyContentLeft): (.justifyContentRight): (.justifyContentFlexStart): (.justifyContentFlexEnd): (.justifyContentSpaceBetween): (.justifyContentSpaceAround): (.justifyContentSpaceEvenly): (.justifyContentStretch): (.justifyContentSafeCenter): (.justifyContentUnsafeCenter): (.justifyContentSafeEnd): (.justifyContentUnsafeEnd): (.justifyContentSafeRight): (.justifyContentUnsafeRight): (.justifyContentSafeLeft): (.justifyContentUnsafeLeft): (.justifyContentSafeFlexEnd): (.justifyContentUnsafeFlexEnd): (.justifyContentSafeFlexStart): (.justifyContentUnsafeFlexStart): (.justifyContentFirstBaseline): (.itemsNormal): (.itemsStretch): (.itemsStart): (.itemsCenter): (.itemsEnd): (.itemsLeft): (.itemsRight): (.itemsSelfStart): (.itemsSelfEnd): (.itemsBaseline): (.selfStretch): (.selfStart): (.selfEnd): (.selfCenter): (.selfRight): (.selfLeft): (.selfSelfStart): (.selfSelfEnd): (.selfBaseline): (.contentStart): (.contentCenter): (.contentEnd): (.contentCenterSafe): (.contentCenterUnsafe): (.contentEndSafe): (.contentEndUnsafe): (.contentSpaceBetween): (.contentSpaceAround): (.contentSpaceEvenly): (.contentStretch): * web-platform-tests/css/support/b-green.css: Added. (.b): * web-platform-tests/css/support/c-red.css: Added. (.c): * web-platform-tests/css/support/cat.png: Added. * web-platform-tests/css/support/green.ico: Added. * web-platform-tests/css/support/import-green.css: Added. (.import): * web-platform-tests/css/support/import-red.css: Added. (.import): * web-platform-tests/css/support/pattern-grg-rgr-grg.png: Added. * web-platform-tests/css/support/pattern-grg-rrg-rgg.png: Added. * web-platform-tests/css/support/pattern-rgr-grg-rgr.png: Added. * web-platform-tests/css/support/pattern-tr.png: Added. * web-platform-tests/css/support/red.ico: Added. * web-platform-tests/css/support/ruler-h-50%.png: Added. * web-platform-tests/css/support/ruler-h-50px.png: Added. * web-platform-tests/css/support/ruler-v-100px.png: Added. * web-platform-tests/css/support/ruler-v-50px.png: Added. * web-platform-tests/css/support/square-purple.png: Added. * web-platform-tests/css/support/square-teal.png: Added. * web-platform-tests/css/support/square-white.png: Added. * web-platform-tests/css/support/support/README: Added. * web-platform-tests/css/support/support/swatch-green.png: Added. * web-platform-tests/css/support/support/swatch-red.png: Added. * web-platform-tests/css/support/support/w3c-import.log: Added. * web-platform-tests/css/support/swatch-blue.png: Added. * web-platform-tests/css/support/swatch-green.png: Added. * web-platform-tests/css/support/swatch-lime.png: Added. * web-platform-tests/css/support/swatch-orange.png: Added. * web-platform-tests/css/support/swatch-red.png: Added. * web-platform-tests/css/support/swatch-teal.png: Added. * web-platform-tests/css/support/swatch-white.png: Added. * web-platform-tests/css/support/swatch-yellow.png: Added. * web-platform-tests/css/support/test-bl.png: Added. * web-platform-tests/css/support/test-br.png: Added. * web-platform-tests/css/support/test-inner-half-size.png: Added. * web-platform-tests/css/support/test-outer.png: Added. * web-platform-tests/css/support/test-tl.png: Added. * web-platform-tests/css/support/test-tr.png: Added. * web-platform-tests/css/support/w3c-import.log: Added. Source/WebCore: The CSS WG has resolved that it doesn't make sense to define Baseline Content-Alignment in the inline/main axis. https://github.com/w3c/csswg-drafts/issues/1184 The spec has been updated so that <baseline-postion> is not valid for the 'justify-content' property's syntax. This CL updates our parsing logic to match the new spec, including the parsing logic of the place-content shorthand. Additionally, this CL updates the computed value of the <baseline-position> values to match other browsers. We don't implement support for <baseline-position> values in the Content Distribution properties (align-content and justify-content), so I don't expect this change to break content of sites using the CSS Box Alignment feature. No new tests, just adapt the Web Platform Tests we already have to the new CSS syntax. * css/parser/CSSPropertyParser.cpp: (WebCore::getBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): Canonical link: https://commits.webkit.org/198092@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-30 16:03:14 +00:00
element.style.alignContent = "first baseline";
checkValues(element, "alignContent", "align-content", "baseline", "baseline");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
[css-align] The 'baseline' value must be invalid for the 'justify-content' property https://bugs.webkit.org/show_bug.cgi?id=181794 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Adapted the test cases using <baseline-position> keywords to the new CSS syntax. Imported the CSS/support folder. * resources/import-expectations.json: * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: (checkPlaceShorhand): (checkPlaceShorhandLonghands): * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: * web-platform-tests/css/support/1x1-green.png: Added. * web-platform-tests/css/support/1x1-lime.png: Added. * web-platform-tests/css/support/1x1-maroon.png: Added. * web-platform-tests/css/support/1x1-navy.png: Added. * web-platform-tests/css/support/1x1-red.png: Added. * web-platform-tests/css/support/1x1-white.png: Added. * web-platform-tests/css/support/60x60-gg-rr.png: Added. * web-platform-tests/css/support/60x60-green.png: Added. * web-platform-tests/css/support/60x60-red.png: Added. * web-platform-tests/css/support/OWNERS: Added. * web-platform-tests/css/support/README: Added. * web-platform-tests/css/support/a-green.css: Added. (.a): * web-platform-tests/css/support/alignment.css: Added. (.alignSelfAuto): (.alignSelfNormal): (.alignSelfStretch): (.alignSelfStart): (.alignSelfEnd): (.alignSelfCenter): (.alignSelfRight): (.alignSelfLeft): (.alignSelfFlexStart): (.alignSelfFlexEnd): (.alignSelfSelfStart): (.alignSelfSelfEnd): (.alignSelfSafeCenter): (.alignSelfUnsafeCenter): (.alignSelfSafeEnd): (.alignSelfUnsafeEnd): (.alignSelfSafeSelfEnd): (.alignSelfUnsafeSelfEnd): (.alignSelfSafeSelfStart): (.alignSelfUnsafeSelfStart): (.alignSelfSafeRight): (.alignSelfUnsafeRight): (.alignSelfSafeLeft): (.alignSelfUnsafeLeft): (.alignSelfSafeFlexEnd): (.alignSelfUnsafeFlexEnd): (.alignSelfSafeFlexStart): (.alignSelfUnsafeFlexStart): (.alignSelfBaseline): (.alignSelfFirstBaseline): (.alignSelfLastBaseline): (.alignItemsAuto): (.alignItemsNormal): (.alignItemsStretch): (.alignItemsStart): (.alignItemsCenter): (.alignItemsEnd): (.alignItemsLeft): (.alignItemsRight): (.alignItemsFlexStart): (.alignItemsFlexEnd): (.alignItemsSelfStart): (.alignItemsSelfEnd): (.alignItemsSafeCenter): (.alignItemsUnsafeCenter): (.alignItemsSafeEnd): (.alignItemsUnsafeEnd): (.alignItemsSafeSelfEnd): (.alignItemsUnsafeSelfEnd): (.alignItemsSafeSelfStart): (.alignItemsUnsafeSelfStart): (.alignItemsSafeRight): (.alignItemsUnsafeRight): (.alignItemsSafeLeft): (.alignItemsUnsafeLeft): (.alignItemsSafeFlexEnd): (.alignItemsUnsafeFlexEnd): (.alignItemsSafeFlexStart): (.alignItemsUnsafeFlexStart): (.alignItemsBaseline): (.alignItemsFirstBaseline): (.alignItemsLastBaseline): (.alignContentBaseline): (.alignContentLastBaseline): (.alignContentStart): (.alignContentEnd): (.alignContentCenter): (.alignContentLeft): (.alignContentRight): (.alignContentFlexStart): (.alignContentFlexEnd): (.alignContentSpaceBetween): (.alignContentSpaceAround): (.alignContentSpaceEvenly): (.alignContentStretch): (.alignContentSafeCenter): (.alignContentUnsafeCenter): (.alignContentSafeEnd): (.alignContentUnsafeEnd): (.alignContentSafeRight): (.alignContentUnsafeRight): (.alignContentSafeLeft): (.alignContentUnsafeLeft): (.alignContentSafeFlexEnd): (.alignContentUnsafeFlexEnd): (.alignContentSafeFlexStart): (.alignContentUnsafeFlexStart): (.alignContentFirstBaseline): (.justifySelfAuto): (.justifySelfNormal): (.justifySelfStretch): (.justifySelfStart): (.justifySelfCenter): (.justifySelfEnd): (.justifySelfRight): (.justifySelfLeft): (.justifySelfFlexStart): (.justifySelfFlexEnd): (.justifySelfSelfStart): (.justifySelfSelfEnd): (.justifySelfSafeCenter): (.justifySelfUnsafeCenter): (.justifySelfSafeEnd): (.justifySelfUnsafeEnd): (.justifySelfSafeSelfEnd): (.justifySelfUnsafeSelfEnd): (.justifySelfSafeSelfStart): (.justifySelfUnsafeSelfStart): (.justifySelfSafeRight): (.justifySelfUnsafeRight): (.justifySelfSafeLeft): (.justifySelfUnsafeLeft): (.justifySelfSafeFlexEnd): (.justifySelfUnsafeFlexEnd): (.justifySelfSafeFlexStart): (.justifySelfUnsafeFlexStart): (.justifySelfBaseline): (.justifySelfFirstBaseline): (.justifySelfLastBaseline): (.justifyItemsAuto): (.justifyItemsNormal): (.justifyItemsStretch): (.justifyItemsStart): (.justifyItemsCenter): (.justifyItemsEnd): (.justifyItemsLeft): (.justifyItemsRight): (.justifyItemsFlexStart): (.justifyItemsFlexEnd): (.justifyItemsSelfStart): (.justifyItemsSelfEnd): (.justifyItemsLegacy): (.justifyItemsLegacyLeft): (.justifyItemsLegacyCenter): (.justifyItemsLegacyRight): (.justifyItemsLeftLegacy): (.justifyItemsCenterLegacy): (.justifyItemsRightLegacy): (.justifyItemsSafeCenter): (.justifyItemsUnsafeCenter): (.justifyItemsSafeEnd): (.justifyItemsUnsafeEnd): (.justifyItemsSafeSelfEnd): (.justifyItemsUnsafeSelfEnd): (.justifyItemsSafeSelfStart): (.justifyItemsUnsafeSelfStart): (.justifyItemsSafeRight): (.justifyItemsUnsafeRight): (.justifyItemsSafeLeft): (.justifyItemsUnsafeLeft): (.justifyItemsSafeFlexEnd): (.justifyItemsUnsafeFlexEnd): (.justifyItemsSafeFlexStart): (.justifyItemsUnsafeFlexStart): (.justifyItemsTest): (.justifyItemsBaseline): (.justifyItemsFirstBaseline): (.justifyItemsLastBaseline): (.justifyContentBaseline): (.justifyContentLastBaseline): (.justifyContentStart): (.justifyContentEnd): (.justifyContentCenter): (.justifyContentLeft): (.justifyContentRight): (.justifyContentFlexStart): (.justifyContentFlexEnd): (.justifyContentSpaceBetween): (.justifyContentSpaceAround): (.justifyContentSpaceEvenly): (.justifyContentStretch): (.justifyContentSafeCenter): (.justifyContentUnsafeCenter): (.justifyContentSafeEnd): (.justifyContentUnsafeEnd): (.justifyContentSafeRight): (.justifyContentUnsafeRight): (.justifyContentSafeLeft): (.justifyContentUnsafeLeft): (.justifyContentSafeFlexEnd): (.justifyContentUnsafeFlexEnd): (.justifyContentSafeFlexStart): (.justifyContentUnsafeFlexStart): (.justifyContentFirstBaseline): (.itemsNormal): (.itemsStretch): (.itemsStart): (.itemsCenter): (.itemsEnd): (.itemsLeft): (.itemsRight): (.itemsSelfStart): (.itemsSelfEnd): (.itemsBaseline): (.selfStretch): (.selfStart): (.selfEnd): (.selfCenter): (.selfRight): (.selfLeft): (.selfSelfStart): (.selfSelfEnd): (.selfBaseline): (.contentStart): (.contentCenter): (.contentEnd): (.contentCenterSafe): (.contentCenterUnsafe): (.contentEndSafe): (.contentEndUnsafe): (.contentSpaceBetween): (.contentSpaceAround): (.contentSpaceEvenly): (.contentStretch): * web-platform-tests/css/support/b-green.css: Added. (.b): * web-platform-tests/css/support/c-red.css: Added. (.c): * web-platform-tests/css/support/cat.png: Added. * web-platform-tests/css/support/green.ico: Added. * web-platform-tests/css/support/import-green.css: Added. (.import): * web-platform-tests/css/support/import-red.css: Added. (.import): * web-platform-tests/css/support/pattern-grg-rgr-grg.png: Added. * web-platform-tests/css/support/pattern-grg-rrg-rgg.png: Added. * web-platform-tests/css/support/pattern-rgr-grg-rgr.png: Added. * web-platform-tests/css/support/pattern-tr.png: Added. * web-platform-tests/css/support/red.ico: Added. * web-platform-tests/css/support/ruler-h-50%.png: Added. * web-platform-tests/css/support/ruler-h-50px.png: Added. * web-platform-tests/css/support/ruler-v-100px.png: Added. * web-platform-tests/css/support/ruler-v-50px.png: Added. * web-platform-tests/css/support/square-purple.png: Added. * web-platform-tests/css/support/square-teal.png: Added. * web-platform-tests/css/support/square-white.png: Added. * web-platform-tests/css/support/support/README: Added. * web-platform-tests/css/support/support/swatch-green.png: Added. * web-platform-tests/css/support/support/swatch-red.png: Added. * web-platform-tests/css/support/support/w3c-import.log: Added. * web-platform-tests/css/support/swatch-blue.png: Added. * web-platform-tests/css/support/swatch-green.png: Added. * web-platform-tests/css/support/swatch-lime.png: Added. * web-platform-tests/css/support/swatch-orange.png: Added. * web-platform-tests/css/support/swatch-red.png: Added. * web-platform-tests/css/support/swatch-teal.png: Added. * web-platform-tests/css/support/swatch-white.png: Added. * web-platform-tests/css/support/swatch-yellow.png: Added. * web-platform-tests/css/support/test-bl.png: Added. * web-platform-tests/css/support/test-br.png: Added. * web-platform-tests/css/support/test-inner-half-size.png: Added. * web-platform-tests/css/support/test-outer.png: Added. * web-platform-tests/css/support/test-tl.png: Added. * web-platform-tests/css/support/test-tr.png: Added. * web-platform-tests/css/support/w3c-import.log: Added. Source/WebCore: The CSS WG has resolved that it doesn't make sense to define Baseline Content-Alignment in the inline/main axis. https://github.com/w3c/csswg-drafts/issues/1184 The spec has been updated so that <baseline-postion> is not valid for the 'justify-content' property's syntax. This CL updates our parsing logic to match the new spec, including the parsing logic of the place-content shorthand. Additionally, this CL updates the computed value of the <baseline-position> values to match other browsers. We don't implement support for <baseline-position> values in the Content Distribution properties (align-content and justify-content), so I don't expect this change to break content of sites using the CSS Box Alignment feature. No new tests, just adapt the Web Platform Tests we already have to the new CSS syntax. * css/parser/CSSPropertyParser.cpp: (WebCore::getBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): Canonical link: https://commits.webkit.org/198092@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-30 16:03:14 +00:00
element.style.alignContent = "last baseline";
checkValues(element, "alignContent", "align-content", "last baseline", "last baseline");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
element.style.alignContent = "normal";
checkValues(element, "alignContent", "align-content", "normal", "normal");
element.style.display = "flex";
element.style.alignContent = "normal";
checkValues(element, "alignContent", "align-content", "normal", "normal");
element.style.display = "grid";
element.style.alignContent = "normal";
checkValues(element, "alignContent", "align-content", "normal", "normal");
element.style.alignContent = "flex-end";
checkValues(element, "alignContent", "align-content", "flex-end", "flex-end");
}, "Test getting and setting align-content through JS");
test(function() {
element = document.createElement("div");
document.body.appendChild(element);
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
checkBadValues(element, "alignContent", "align-content", "left");
checkBadValues(element, "alignContent", "align-content", "right");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
checkBadValues(element, "alignContent", "align-content", "auto");
checkBadValues(element, "alignContent", "align-content", "unsafe auto");
checkBadValues(element, "alignContent", "align-content", "auto safe");
checkBadValues(element, "alignContent", "align-content", "auto left");
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
checkBadValues(element, "alignContent", "align-content", "safe left");
checkBadValues(element, "alignContent", "align-content", "unsafe right");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
checkBadValues(element, "alignContent", "align-content", "baseline safe");
checkBadValues(element, "alignContent", "align-content", "last-baseline center");
checkBadValues(element, "alignContent", "align-content", "unsafe unsafe");
checkBadValues(element, "alignContent", "align-content", "unsafe safe");
checkBadValues(element, "alignContent", "align-content", "center start");
checkBadValues(element, "alignContent", "align-content", "baseline safe");
checkBadValues(element, "alignContent", "align-content", "unsafe baseline");
checkBadValues(element, "alignContent", "align-content", "unsafe safe left");
checkBadValues(element, "alignContent", "align-content", "unsafe left safe");
checkBadValues(element, "alignContent", "align-content", "left safe unsafe safe");
checkBadValues(element, "alignContent", "align-content", "start right space-between");
checkBadValues(element, "alignContent", "align-content", "safe stretch");
checkBadValues(element, "alignContent", "align-content", "normal space-between");
checkBadValues(element, "alignContent", "align-content", "stretch normal");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkBadValues(element, "alignContent", "align-content", "stretch center");
checkBadValues(element, "alignContent", "align-content", "space-between right safe");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
checkBadValues(element, "alignContent", "align-content", "normal safe");
checkBadValues(element, "alignContent", "align-content", "space-around stretch");
checkBadValues(element, "alignContent", "align-content", "end space-between start");
checkBadValues(element, "alignContent", "align-content", "right safe left");
checkBadValues(element, "alignContent", "align-content", "unsafe");
checkBadValues(element, "alignContent", "align-content", "safe");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkBadValues(element, "alignContent", "align-content", "start safe");
checkBadValues(element, "alignContent", "align-content", "end unsafe");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
}, "Test bad combinations of align-content");
test(function() {
element.style.display = "";
checkInitialValues(element, "alignContent", "align-content", "center", "normal");
}, "Test the value 'initial'");
test(function() {
element.style.display = "grid";
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
checkInitialValues(element, "alignContent", "align-content", "safe start", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
}, "Test the value 'initial' for grid containers");
test(function() {
element.style.display = "flex";
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
checkInitialValues(element, "alignContent", "align-content", "unsafe end", "normal");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
}, "Test the value 'initial' for flex containers");
test(function() {
checkInheritValues("alignContent", "align-content", "end");
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment https://bugs.webkit.org/show_bug.cgi?id=181792 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Imported new Web Platform Tests for the css-align module. * resources/import-expectations.json: * web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed. * web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added. * web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt. * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html. * web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added. * web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt. * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html. * web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added. * web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht. * web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html. * web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log. * web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added. (checkPlaceShorhand): (checkPlaceShorhandLonghands): (checkPlaceShorthandInvalidValues): (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): * web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added. * web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt. * web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html. * web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added. Source/WebCore: The CSS WG resolved to remove the 'left' and 'right' values from the block/cross axis alignment properties. https://github.com/w3c/csswg-drafts/issues/1403 This patch changes the CSS parsing logic of all the CSS Box Alignment properties, both block-axis (align-{self, items, content} and inline-axis (justify-{self, items, content}). Additionally, the alignment shorthands (place-{self, items, content}) have been also changed to respect the new syntax. Despite the number of layout tests changed, I don't think this change will break any content in current sites. The CSS values 'left' and 'right' were introduced by the new CSS Box Alignment spec and only implemented by the CSS Grid Layout feature, shipped last year. Additionally, the removed values have no effect on the layout result when they are applied to the block/cross-axis CSS Alignment properties. Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html * css/parser/CSSPropertyParser.cpp: (WebCore::isLeftOrRightKeyword): (WebCore::isContentPositionKeyword): (WebCore::isContentPositionOrLeftOrRightKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::isSelfPositionKeyword): (WebCore::isSelfPositionOrLeftOrRightKeyword): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeAlignItems): (WebCore::consumeJustifyItems): (WebCore::CSSPropertyParser::parseSingleValue): (WebCore::consumeSimplifiedContentPosition): (WebCore::CSSPropertyParser::consumePlaceContentShorthand): (WebCore::consumeSimplifiedItemPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): LayoutTests: Rebaseline tests because of the removal of the 'left' and right' CSS values. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: Canonical link: https://commits.webkit.org/197832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-23 20:30:21 +00:00
checkInheritValues("alignContent", "align-content", "safe start");
[css-align] 'overflow' keyword must precede the self-position and content-position value https://bugs.webkit.org/show_bug.cgi?id=181793 Reviewed by Antti Koivisto. Source/WebCore: There were several discussions to avoid ambiguities with the complex values, specially when it comes to define the place-xxx shorthands. One of the sources of problems is the 'overflow-position' keyword. The CSS WG has decided to change the syntax of all the CSS Box Alignment properties so that the 'overflow-position' keyword always precede the 'self-position' or the 'content-position' keywords. https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434 In order to apply this change to the Content Distribution properties' (align-content and justify-content) syntax I had to completely re-implement their parsing function. Thanks to this I addressed also the issue with the content-distribution fallback, which cannot be specified explicitly now. https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4 No new tests, just rebaselined the expected results of the test cases affected. Despite the so many layout tests affected by this change, it's unlikely that it might break any content in current web sites. This patch changes the new CSS syntax, obviously backward compatible, defined by the new CSS Box Alignment. The 'overflow-position' keyword is only used by the layout models implementing the new spec, so far only CSS Grid Layout. Considering that CSS Grid has been shipped last year, it's unlikely that many sites are using the new CSS values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText const): * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeOverflowPositionKeyword): (WebCore::consumeContentPositionKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Rebaseline expected results of the test cases affected by this change. * css3/parse-align-content.html: * css3/parse-align-items.html: * css3/parse-align-self.html: * css3/parse-justify-content.html: * css3/overwrite-self-alignment.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/overwrite-content-alignment.html: * fast/css-grid-layout/grid-content-alignment-overflow.html: * fast/css-grid-layout/grid-align-justify-overflow.html: * fast/css/parse-justify-items.html: * fast/css/parse-justify-self.html: * fast/repaint/align-items-overflow-change.html: * fast/repaint/align-self-overflow-change.html: * fast/repaint/justify-items-overflow-change.html: * fast/repaint/justify-self-overflow-change.html: Canonical link: https://commits.webkit.org/197764@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-22 17:01:51 +00:00
checkInheritValues("alignContent", "align-content", "unsafe center");
[css-align] Adapt content-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170262 Reviewed by David Hyatt. Source/WebCore: The baseline-position syntax has changed recently, so we need to update the CSS properties using the old syntax. This patch address only the content-alignment (align-content and justify-content). I used this patch to adapt the implementation of the parsing logic for these properties to the new Blink's CSS Parsing Design. The new baseline syntax is "[first | last ]? baseline" which implies modifying the parsing and computed value logic. There are several layout tests affected by this change, so I'll update them accordingly. No new tests, just added/modified some cases to the tests we already have using the new baseline values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): * css/CSSContentDistributionValue.cpp: (WebCore::CSSContentDistributionValue::customCSSText): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator ItemPosition): (WebCore::CSSPrimitiveValue::operator ContentPosition): * css/CSSValueKeywords.in: * css/parser/CSSPropertyParser.cpp: (WebCore::isBaselineKeyword): (WebCore::consumeBaselineKeyword): (WebCore::consumeContentDistributionOverflowPosition): (WebCore::consumeSelfPositionOverflowPosition): LayoutTests: Added new cases to the alignment properties parsing tests so that we can verify the new baseline-alignment syntax is parsed as expected. Additionally, I modified the tests so that they use the testharness format. * css3/parse-align-content-expected.txt: * css3/parse-align-content.html: * css3/parse-justify-content-expected.txt: * css3/parse-justify-content.html: Canonical link: https://commits.webkit.org/187220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-30 21:27:09 +00:00
}, "Test the value 'inherit'");
[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. Canonical link: https://commits.webkit.org/162640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-05 15:15:38 +00:00
</script>