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

270 lines
11 KiB
HTML
Raw Permalink Normal View History

[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
<!DOCTYPE html>
<style>
#alignSelfBaseline {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: baseline;
}
#alignSelfFirstBaseline {
align-self: first baseline;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfLastBaseline {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: last baseline;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfStretch {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: stretch;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
#alignSelfNormal {
align-self: normal;
}
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
#alignSelfStart {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: start;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfEnd {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: end;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfCenter {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: center;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfSelfStart {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: self-start;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfSelfEnd {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: self-end;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfFlexStart {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: flex-start;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
#alignSelfFlexEnd {
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
align-self: flex-end;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfUnsafeEnd {
align-self: unsafe end ;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfUnsafeCenter {
align-self: unsafe center ;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfSafeSelfEnd {
align-self: safe self-end;
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfSafeSelfStart {
align-self: safe self-start;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfUnsafeFlexStart {
align-self: unsafe flex-start;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +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
#alignSelfSafeFlexEnd {
align-self: safe flex-end;
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
}
</style>
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
<p>Test that setting and getting align-self works as expected</p>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
<div id="alignSelfBaseline"></div>
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
<div id="alignSelfFirstBaseline"></div>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
<div id="alignSelfLastBaseline"></div>
<div id="alignSelfStretch"></div>
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
<div id="alignSelfNormal"></div>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
<div id="alignSelfStart"></div>
<div id="alignSelfEnd"></div>
<div id="alignSelfCenter"></div>
<div id="alignSelfSelfStart"></div>
<div id="alignSelfSelfEnd"></div>
<div id="alignSelfFlexStart"></div>
<div id="alignSelfFlexEnd"></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="alignSelfUnsafeEnd"></div>
<div id="alignSelfUnsafeCenter"></div>
<div id="alignSelfSafeSelfEnd"></div>
<div id="alignSelfSafeSelfStart"></div>
<div id="alignSelfUnsafeFlexStart"></div>
<div id="alignSelfSafeFlexEnd"></div>
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="resources/alignment-parsing-utils-th.js"></script>
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
<script>
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
test(function() {
var alignSelfBaseline = document.getElementById("alignSelfBaseline");
checkValues(alignSelfBaseline, "alignSelf", "align-self", "", "baseline");
var alignSelfFirstBaseline = document.getElementById("alignSelfFirstBaseline");
checkValues(alignSelfFirstBaseline, "alignSelf", "align-self", "", "baseline");
var alignSelfLastBaseline = document.getElementById("alignSelfLastBaseline");
checkValues(alignSelfLastBaseline, "alignSelf", "align-self", "", "last baseline");
var alignSelfStretch = document.getElementById("alignSelfStretch");
checkValues(alignSelfStretch, "alignSelf", "align-self", "", "stretch");
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
var alignSelfNormal = document.getElementById("alignSelfNormal");
checkValues(alignSelfNormal, "alignSelf", "align-self", "", "normal");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
var alignSelfStart = document.getElementById("alignSelfStart");
checkValues(alignSelfStart, "alignSelf", "align-self", "", "start");
var alignSelfEnd = document.getElementById("alignSelfEnd");
checkValues(alignSelfEnd, "alignSelf", "align-self", "", "end");
var alignSelfCenter = document.getElementById("alignSelfCenter");
checkValues(alignSelfCenter, "alignSelf", "align-self", "", "center");
var alignSelfSelfEnd = document.getElementById("alignSelfSelfEnd");
checkValues(alignSelfSelfEnd, "alignSelf", "align-self", "", "self-end");
var alignSelfSelfStart = document.getElementById("alignSelfSelfStart");
checkValues(alignSelfSelfStart, "alignSelf", "align-self", "", "self-start");
var alignSelfFlexStart = document.getElementById("alignSelfFlexStart");
checkValues(alignSelfFlexStart, "alignSelf", "align-self", "", "flex-start");
var alignSelfFlexEnd = document.getElementById("alignSelfFlexEnd");
checkValues(alignSelfFlexEnd, "alignSelf", "align-self", "", "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 alignSelfUnsafeEnd = document.getElementById("alignSelfUnsafeEnd");
checkValues(alignSelfUnsafeEnd, "alignSelf", "align-self", "", "unsafe end");
var alignSelfUnsafeCenter = document.getElementById("alignSelfUnsafeCenter");
checkValues(alignSelfUnsafeCenter, "alignSelf", "align-self", "", "unsafe center");
var alignSelfSafeSelfEnd = document.getElementById("alignSelfSafeSelfEnd");
checkValues(alignSelfSafeSelfEnd, "alignSelf", "align-self", "", "safe self-end");
var alignSelfSafeSelfStart = document.getElementById("alignSelfSafeSelfStart");
checkValues(alignSelfSafeSelfStart, "alignSelf", "align-self", "", "safe self-start");
var alignSelfUnsafeFlexStart = document.getElementById("alignSelfUnsafeFlexStart");
checkValues(alignSelfUnsafeFlexStart, "alignSelf", "align-self", "", "unsafe flex-start");
var alignSelfSafeFlexEnd = document.getElementById("alignSelfSafeFlexEnd");
checkValues(alignSelfSafeFlexEnd, "alignSelf", "align-self", "", "safe flex-end");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test getting align-self set through CSS.");
test(function() {
element = document.createElement("div");
document.body.appendChild(element);
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkValues(element, "alignSelf", "align-self", "", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test initial value of align-self through JS");
test(function() {
container = document.createElement("div");
element = document.createElement("div");
container.appendChild(element);
document.body.appendChild(container);
element.style.alignSelf = "center";
checkValues(element, "alignSelf", "align-self", "center", "center");
element.style.alignSelf = "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, "alignSelf", "align-self", "unsafe start", "unsafe start");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +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.alignSelf = "safe flex-end";
checkValues(element, "alignSelf", "align-self", "safe flex-end", "safe flex-end");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
element.style.alignSelf = "center";
checkValues(element, "alignSelf", "align-self", "center", "center");
element.style.alignSelf = "self-start";
checkValues(element, "alignSelf", "align-self", "self-start", "self-start");
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
element.style.alignSelf = "normal";
checkValues(element, "alignSelf", "align-self", "normal", "normal");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
element.style.alignSelf = "auto";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkValues(element, "alignSelf", "align-self", "auto", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
container.style.display = "flex";
element.style.alignSelf = "auto";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkValues(element, "alignSelf", "align-self", "auto", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
container.style.display = "grid";
element.style.alignSelf = "auto";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkValues(element, "alignSelf", "align-self", "auto", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
element.style.alignSelf = "self-end";
checkValues(element, "alignSelf", "align-self", "self-end", "self-end");
}, "Test getting and setting align-self through JS");
test(function() {
document.documentElement.style.alignSelf = "auto";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkValues(document.documentElement, "alignSelf", "align-self", "auto", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test 'auto' value resolution for the root node");
test(function() {
container = document.createElement("div");
element = document.createElement("div");
container.appendChild(element);
document.body.appendChild(container);
[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, "alignSelf", "align-self", "left");
checkBadValues(element, "alignSelf", "align-self", "right");
checkBadValues(element, "alignSelf", "align-self", "safe auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
checkBadValues(element, "alignSelf", "align-self", "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, "alignSelf", "align-self", "safe right");
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkBadValues(element, "alignSelf", "align-self", "normal unsafe");
checkBadValues(element, "alignSelf", "align-self", "normal stretch");
checkBadValues(element, "alignSelf", "align-self", "baseline normal");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
checkBadValues(element, "alignSelf", "align-self", "baseline safe");
checkBadValues(element, "alignSelf", "align-self", "baseline center");
[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, "alignSelf", "align-self", "first baseline center");
checkBadValues(element, "alignSelf", "align-self", "last baseline center");
checkBadValues(element, "alignSelf", "align-self", "baseline last");
checkBadValues(element, "alignSelf", "align-self", "baseline first");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
checkBadValues(element, "alignSelf", "align-self", "stretch unsafe");
checkBadValues(element, "alignSelf", "align-self", "stretch right");
checkBadValues(element, "alignSelf", "align-self", "unsafe unsafe");
checkBadValues(element, "alignSelf", "align-self", "unsafe safe");
checkBadValues(element, "alignSelf", "align-self", "center start");
checkBadValues(element, "alignSelf", "align-self", "stretch unsafe");
checkBadValues(element, "alignSelf", "align-self", "safe stretch");
checkBadValues(element, "alignSelf", "align-self", "baseline safe");
checkBadValues(element, "alignSelf", "align-self", "unsafe baseline");
checkBadValues(element, "alignSelf", "align-self", "unsafe safe left");
checkBadValues(element, "alignSelf", "align-self", "unsafe left safe");
checkBadValues(element, "alignSelf", "align-self", "left safe unsafe safe");
checkBadValues(element, "alignSelf", "align-self", "legacy start");
checkBadValues(element, "alignSelf", "align-self", "legacy end");
checkBadValues(element, "alignSelf", "align-self", "legacy right unsafe");
checkBadValues(element, "alignSelf", "align-self", "legacy auto");
checkBadValues(element, "alignSelf", "align-self", "legacy stretch");
checkBadValues(element, "alignSelf", "align-self", "legacy");
checkBadValues(element, "alignSelf", "align-self", "legacy left right");
[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, "alignSelf", "align-self", "start safe");
checkBadValues(element, "alignSelf", "align-self", "end unsafe");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test bad combinations of align-self");
test(function() {
container.style.display = "";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkInitialValues(element, "alignSelf", "align-self", "center", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'initial'");
test(function() {
container.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, "alignSelf", "align-self", "safe start", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'initial' for grid containers");
test(function() {
container.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, "alignSelf", "align-self", "unsafe end", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'initial' for flex containers");
test(function() {
container.style.display = "";
element.style.position = "absolute";
[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, "alignSelf", "align-self", "start", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'initial' for positioned elements");
test(function() {
container.style.display = "grid";
element.style.position = "absolute";
[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, "alignSelf", "align-self", "end", "auto");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'initial' for positioned elements in grid containers");
test(function() {
container.style.display = "flex";
element.style.position = "absolute";
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved https://bugs.webkit.org/show_bug.cgi?id=172707 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: This change makes all the cases of the test below to pass now, hence updated expectations accordingly. * web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt: Source/WebCore: The CSS Box Alignment specification has been changed recently so that now all the propeties have the specificed value as computed value. The rationale of this change are at the associated W3C github issue [1]. This change implies that we don't need to execute the StyleAdjuter logic we implemented specifically for supporting 'auto' values resolution for computed style. We can live now with resolution at layout time only. [1] https://github.com/w3c/csswg-drafts/issues/440 No new tests, just updating the already defined tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Removed * css/StyleResolver.h: * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::resolveCustomStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::columnFlexItemHasStretchAlignment): (WebCore::RenderBox::hasStretchedLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::styleDidChange): Added (WebCore::RenderFlexibleBox::alignmentForChild): * rendering/RenderFlexibleBox.h: LayoutTests: Updated layout tests so that resolved value is as specified, even for 'auto' values. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: * css3/parse-align-self.html: * css3/parse-alignment-of-root-elements-expected.txt: * css3/parse-alignment-of-root-elements.html: * css3/parse-place-items.html: * css3/parse-place-self.html: * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: * fast/css/parse-justify-self.html: Canonical link: https://commits.webkit.org/191158@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-07-10 23:56:21 +00:00
checkInitialValues(element, "alignSelf", "align-self", "end", "auto");
[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
}, "Test the value 'initial' for positioned elements in flex containers");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
test(function() {
checkInheritValues("alignSelf", "align-self", "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("alignSelf", "align-self", "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("alignSelf", "align-self", "unsafe center");
[css-align] Adapt self-alignment properties to the new baseline syntax https://bugs.webkit.org/show_bug.cgi?id=170235 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 self-alignment (align-self and justify-self) and default-alignment (align-items and justify-items). The content-distribution properties (align-content and justify-content) will be updated in a follow up patch. 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::valueForItemPositionWithOverflowAlignment): * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeBaselineKeyword): (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-items-expected.txt: * css3/parse-align-items.html: * css3/parse-align-self-expected.txt: * css3/parse-align-self.html: * css3/resources/alignment-parsing-utils-th.js: (checkValues): * 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: * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): (checkSupportedValues): Canonical link: https://commits.webkit.org/187176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-29 22:01:11 +00:00
}, "Test the value 'inherit'");
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3 https://bugs.webkit.org/show_bug.cgi?id=133359 Reviewed by David Hyatt. From Blink r164817 and r165264 by <jchaffraix@chromium.org> Source/WebCore: Broaden justify-self's parsing name This is in preparation of migrating align-self, align-items and justify-items to the CSS 3 Alignment syntax. The current naming was too tied to justify-self and needs to be broadened. This will reduce the follow-up implementations' patches. Upgrade align-self and align-items parsing to CSS 3 This change migrates the 2 properties to the CSS 3 Alignment parsing. The new parsing is identical to how we parse 'justify-self'. The 2 properties need to be migrated together as they are used in tandem in CSSComputedStyleDeclaration. This change also removes EAlignItems as it is now unused. Tests: css3/parse-align-items.html css3/parse-align-self.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties. (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties. (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items. (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items. (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value. (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties. (WebCore::CSSParser::parseJustifySelf): Deleted. (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties. * css/CSSParser.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added. (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration. (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added. (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted. (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: * css/StyleBuilderCustom.h: (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added. (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added. (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added. (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added. (WebCore::StyleBuilderCustom::applyValueAlignItems): Added. (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added. (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added. (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted. * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function. (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle. (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle. * rendering/RenderBox.cpp: (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum. (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum. (WebCore::resolveAlignment): Deleted. Moved to RenderStyle. * rendering/RenderFlexibleBox.h: * rendering/RenderFullScreen.cpp: (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum. * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum. (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum. * rendering/style/ContentData.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignment): Added. * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum. * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum. (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum. * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum. * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach. LayoutTests: Broaden justify-self's parsing name and upgrade align-self and align-items parsing to CSS 3. * TestExpectations: * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * css3/parse-align-items-expected.txt: Added. * css3/parse-align-items.html: Added. * css3/parse-align-self-expected.txt: Added. * css3/parse-align-self.html: Added. * css3/resources/alignment-parsing-utils.js: Added. (checkValues): (checkBadValues): (checkInitialValues): (checkInheritValues): (checkLegacyValues): * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * fast/css/getComputedStyle/resources/property-names.js: * fast/css/parse-justify-self-expected.txt: * fast/css/parse-justify-self.html: * svg/css/getComputedStyle-basic-expected.txt: Canonical link: https://commits.webkit.org/161247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-03-30 18:33:39 +00:00
</script>