Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[css-align] Implement the new behavior of 'legacy' for justify-items
https://bugs.webkit.org/show_bug.cgi?id=172712 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: Rebaselined Default Alignment related tests because of the new 'legacy' value. * 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/default-alignment/parse-justify-items-002-expected.txt: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Source/WebCore: The syntax of the 'justify-items' property accepts a new 'legacy' value, replacing the 'auto' value which is now parsed as invalid. w3c/csswg-drafts#1318 This change affects also to the 'place-items' shorthand, which doesn't accept 'auto' and, for the time being, neither 'legacy'. Since the new value 'legacy' is also the default value, I don't expect this change to break content of sites currently using the 'justify-items' property. No new tests, rebaselined existing test. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForItemPositionWithOverflowAlignment): (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ItemPosition const): * css/CSSProperties.json: * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): * css/parser/CSSPropertyParser.cpp: (WebCore::isAuto): (WebCore::isNormalOrStretch): (WebCore::consumeSelfPositionOverflowPosition): (WebCore::consumeJustifyItems): (WebCore::consumeSimplifiedDefaultPosition): (WebCore::consumeSimplifiedSelfPosition): (WebCore::CSSPropertyParser::consumePlaceItemsShorthand): (WebCore::CSSPropertyParser::consumePlaceSelfShorthand): * rendering/RenderFlexibleBox.cpp: (WebCore::alignmentOffset): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::columnAxisPositionForChild const): (WebCore::RenderGrid::rowAxisPositionForChild const): * rendering/style/RenderStyle.cpp: (WebCore::resolvedSelfAlignment): (WebCore::RenderStyle::resolvedJustifyItems const): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::initialJustifyItems): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): LayoutTests: Rebaselined Default Alignment related tests because of the new 'legacy' value. * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * fast/css/parse-justify-items.html: Canonical link: https://commits.webkit.org/198450@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
281 additions
and 143 deletions.
- +13 −0 LayoutTests/ChangeLog
- +7 −7 LayoutTests/css3/parse-alignment-of-root-elements-expected.txt
- +55 −55 LayoutTests/css3/parse-alignment-of-root-elements.html
- +1 −2 LayoutTests/css3/parse-place-items-expected.txt
- +12 −13 LayoutTests/css3/parse-place-items.html
- +2 −2 LayoutTests/fast/css/parse-justify-items-expected.txt
- +13 −14 LayoutTests/fast/css/parse-justify-items.html
- +17 −0 LayoutTests/imported/w3c/ChangeLog
- +1 −0 ...3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt
- +6 −0 ...ported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
- +22 −0 ...ed/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-007-ref.html
- +7 −7 ...orted/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt
- +7 −7 ...ests/imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
- +1 −1 ...orted/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt
- +2 −1 ...ted/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt
- +12 −1 ...ts/imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
- +53 −0 Source/WebCore/ChangeLog
- +5 −2 Source/WebCore/css/CSSComputedStyleDeclaration.cpp
- +5 −0 Source/WebCore/css/CSSPrimitiveValueMappings.h
- +0 −1 Source/WebCore/css/CSSProperties.json
- +4 −7 Source/WebCore/css/StyleResolver.cpp
- +29 −15 Source/WebCore/css/parser/CSSPropertyParser.cpp
- +1 −0 Source/WebCore/rendering/RenderFlexibleBox.cpp
- +2 −0 Source/WebCore/rendering/RenderGrid.cpp
- +1 −6 Source/WebCore/rendering/style/RenderStyle.cpp
- +1 −0 Source/WebCore/rendering/style/RenderStyle.h
- +1 −1 Source/WebCore/rendering/style/RenderStyleConstants.h
- +1 −1 Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.