| Index: Source/core/css/CSSPrimitiveValueMappings.h
|
| diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
|
| index 41222d9b8c02e49ed85eb95cb71a7a666dad5044..1006b158e088c4220bcc3634255e1411cbe10df9 100644
|
| --- a/Source/core/css/CSSPrimitiveValueMappings.h
|
| +++ b/Source/core/css/CSSPrimitiveValueMappings.h
|
| @@ -4790,6 +4790,115 @@ template<> inline CSSPrimitiveValue::operator ItemPosition() const
|
| return ItemPositionAuto;
|
| }
|
|
|
| +template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentPosition contentPosition)
|
| + : CSSValue(PrimitiveClass)
|
| +{
|
| + m_primitiveUnitType = CSS_VALUE_ID;
|
| + switch (contentPosition) {
|
| + case ContentPositionAuto:
|
| + m_value.valueID = CSSValueAuto;
|
| + break;
|
| + case ContentPositionBaseline:
|
| + m_value.valueID = CSSValueBaseline;
|
| + break;
|
| + case ContentPositionLastBaseline:
|
| + m_value.valueID = CSSValueLastBaseline;
|
| + break;
|
| + case ContentPositionCenter:
|
| + m_value.valueID = CSSValueCenter;
|
| + break;
|
| + case ContentPositionStart:
|
| + m_value.valueID = CSSValueStart;
|
| + break;
|
| + case ContentPositionEnd:
|
| + m_value.valueID = CSSValueEnd;
|
| + break;
|
| + case ContentPositionFlexStart:
|
| + m_value.valueID = CSSValueFlexStart;
|
| + break;
|
| + case ContentPositionFlexEnd:
|
| + m_value.valueID = CSSValueFlexEnd;
|
| + break;
|
| + case ContentPositionLeft:
|
| + m_value.valueID = CSSValueLeft;
|
| + break;
|
| + case ContentPositionRight:
|
| + m_value.valueID = CSSValueRight;
|
| + break;
|
| + }
|
| +}
|
| +
|
| +template<> inline CSSPrimitiveValue::operator ContentPosition() const
|
| +{
|
| + switch (m_value.valueID) {
|
| + case CSSValueAuto:
|
| + return ContentPositionAuto;
|
| + case CSSValueBaseline:
|
| + return ContentPositionBaseline;
|
| + case CSSValueLastBaseline:
|
| + return ContentPositionLastBaseline;
|
| + case CSSValueCenter:
|
| + return ContentPositionCenter;
|
| + case CSSValueStart:
|
| + return ContentPositionStart;
|
| + case CSSValueEnd:
|
| + return ContentPositionEnd;
|
| + case CSSValueFlexStart:
|
| + return ContentPositionFlexStart;
|
| + case CSSValueFlexEnd:
|
| + return ContentPositionFlexEnd;
|
| + case CSSValueLeft:
|
| + return ContentPositionLeft;
|
| + case CSSValueRight:
|
| + return ContentPositionRight;
|
| + default:
|
| + break;
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| + return ContentPositionAuto;
|
| +}
|
| +
|
| +template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistributionType contentDistribution)
|
| + : CSSValue(PrimitiveClass)
|
| +{
|
| + m_primitiveUnitType = CSS_VALUE_ID;
|
| + switch (contentDistribution) {
|
| + case ContentDistributionDefault:
|
| + m_value.valueID = CSSValueDefault;
|
| + break;
|
| + case ContentDistributionSpaceBetween:
|
| + m_value.valueID = CSSValueSpaceBetween;
|
| + break;
|
| + case ContentDistributionSpaceAround:
|
| + m_value.valueID = CSSValueSpaceAround;
|
| + break;
|
| + case ContentDistributionSpaceEvenly:
|
| + m_value.valueID = CSSValueSpaceEvenly;
|
| + break;
|
| + case ContentDistributionStretch:
|
| + m_value.valueID = CSSValueStretch;
|
| + break;
|
| + }
|
| +}
|
| +
|
| +template<> inline CSSPrimitiveValue::operator ContentDistributionType() const
|
| +{
|
| + switch (m_value.valueID) {
|
| + case CSSValueSpaceBetween:
|
| + return ContentDistributionSpaceBetween;
|
| + case CSSValueSpaceAround:
|
| + return ContentDistributionSpaceAround;
|
| + case CSSValueSpaceEvenly:
|
| + return ContentDistributionSpaceEvenly;
|
| + case CSSValueStretch:
|
| + return ContentDistributionStretch;
|
| + default:
|
| + break;
|
| + }
|
| + ASSERT_NOT_REACHED();
|
| + return ContentDistributionStretch;
|
| +}
|
| +
|
| template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverflowAlignment overflowAlignment)
|
| : CSSValue(PrimitiveClass)
|
| {
|
|
|