summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSPrimitiveValueMappings.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/css/CSSPrimitiveValueMappings.h')
-rw-r--r--Source/WebCore/css/CSSPrimitiveValueMappings.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h
index 22f9fb707..db10acadd 100644
--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h
@@ -149,26 +149,32 @@ template<> inline CSSPrimitiveValue::operator LineClampValue() const
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan)
: CSSValue(PrimitiveClass)
{
+ m_primitiveUnitType = CSS_IDENT;
switch (columnSpan) {
case ColumnSpanAll:
- m_primitiveUnitType = CSS_IDENT;
m_value.ident = CSSValueAll;
break;
- case ColumnSpanOne:
- m_primitiveUnitType = CSS_NUMBER;
- m_value.num = 1;
+ case ColumnSpanNone:
+ m_value.ident = CSSValueNone;
break;
}
}
template<> inline CSSPrimitiveValue::operator ColumnSpan() const
{
- if (m_primitiveUnitType == CSS_IDENT && m_value.ident == CSSValueAll)
- return ColumnSpanAll;
+ // Map 1 to none for compatibility reasons.
if (m_primitiveUnitType == CSS_NUMBER && m_value.num == 1)
- return ColumnSpanOne;
+ return ColumnSpanNone;
+
+ switch (m_value.ident) {
+ case CSSValueAll:
+ return ColumnSpanAll;
+ case CSSValueNone:
+ return ColumnSpanNone;
+ }
+
ASSERT_NOT_REACHED();
- return ColumnSpanOne;
+ return ColumnSpanNone;
}