| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| index 6227c6d6293da1a0824d170335fb272c5a04f007..c7dd2a55325c0941cfaf7518b23559415f4008a5 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -659,16 +659,32 @@ valueForContentPositionAndDistributionWithOverflowAlignment(
|
| const StyleContentAlignmentData& data,
|
| CSSValueID normalBehaviorValueID) {
|
| CSSValueList* result = CSSValueList::createSpaceSeparated();
|
| + // Handle content-distribution values
|
| if (data.distribution() != ContentDistributionDefault)
|
| result->append(*CSSIdentifierValue::create(data.distribution()));
|
| - if (data.distribution() == ContentDistributionDefault ||
|
| - data.position() != ContentPositionNormal) {
|
| - if (!RuntimeEnabledFeatures::cssGridLayoutEnabled() &&
|
| - data.position() == ContentPositionNormal)
|
| - result->append(*CSSIdentifierValue::create(normalBehaviorValueID));
|
| - else
|
| +
|
| + // Handle content-position values (either as fallback or actual value)
|
| + switch (data.position()) {
|
| + case ContentPositionNormal:
|
| + // Handle 'normal' value, not valid as content-distribution fallback.
|
| + if (data.distribution() == ContentDistributionDefault) {
|
| + result->append(*CSSIdentifierValue::create(
|
| + RuntimeEnabledFeatures::cssGridLayoutEnabled()
|
| + ? CSSValueNormal
|
| + : normalBehaviorValueID));
|
| + }
|
| + break;
|
| + case ContentPositionLastBaseline:
|
| + result->append(
|
| + *CSSValuePair::create(CSSIdentifierValue::create(CSSValueLast),
|
| + CSSIdentifierValue::create(CSSValueBaseline),
|
| + CSSValuePair::DropIdenticalValues));
|
| + break;
|
| + default:
|
| result->append(*CSSIdentifierValue::create(data.position()));
|
| }
|
| +
|
| + // Handle overflow-alignment (only allowed for content-position values)
|
| if ((data.position() >= ContentPositionCenter ||
|
| data.distribution() != ContentDistributionDefault) &&
|
| data.overflow() != OverflowAlignmentDefault)
|
|
|