Index: Source/core/css/CSSPrimitiveValueMappings.h |
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h |
index 4c0a4011ff4784d539d773d0badbae5f445e8d20..feb9da9128613f5c9413ac5ab2931e92efa734a6 100644 |
--- a/Source/core/css/CSSPrimitiveValueMappings.h |
+++ b/Source/core/css/CSSPrimitiveValueMappings.h |
@@ -3482,6 +3482,76 @@ template<> inline CSSPrimitiveValue::operator FontWeight() const |
return FontWeightNormal; |
} |
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStretch stretch) |
+ : CSSValue(PrimitiveClass) |
+{ |
+ fprintf(stderr, "CSSPrimitiveValue::CSSPrimitiveValue(FontStretch stretch)\n"); |
+ m_primitiveUnitType = CSS_VALUE_ID; |
+ switch (stretch) { |
+ case FontStretchUltraCondensed: |
+ m_value.valueID = CSSValueUltraCondensed; |
+ return; |
+ case FontStretchExtraCondensed: |
+ m_value.valueID = CSSValueExtraCondensed; |
+ return; |
+ case FontStretchCondensed: |
+ m_value.valueID = CSSValueCondensed; |
+ return; |
+ case FontStretchSemiCondensed: |
+ m_value.valueID = CSSValueSemiCondensed; |
+ return; |
+ case FontStretchNormal: |
+ m_value.valueID = CSSValueNormal; |
+ return; |
+ case FontStretchSemiExpanded: |
+ m_value.valueID = CSSValueSemiExpanded; |
+ return; |
+ case FontStretchExpanded: |
+ m_value.valueID = CSSValueExpanded; |
+ return; |
+ case FontStretchExtraExpanded: |
+ m_value.valueID = CSSValueExtraExpanded; |
+ return; |
+ case FontStretchUltraExpanded: |
+ m_value.valueID = CSSValueUltraExpanded; |
+ return; |
+ } |
+ |
+ ASSERT_NOT_REACHED(); |
+ m_value.valueID = CSSValueNormal; |
+} |
+ |
+template<> inline CSSPrimitiveValue::operator FontStretch() const |
+{ |
+ fprintf(stderr, "CSSPrimitiveValue::operator FontStretch\n"); |
+ ASSERT(isValueID()); |
+ switch (m_value.valueID) { |
+ case CSSValueUltraCondensed: |
+ return FontStretchUltraCondensed; |
+ case CSSValueExtraCondensed: |
+ return FontStretchExtraCondensed; |
+ case CSSValueCondensed: |
+ return FontStretchCondensed; |
+ case CSSValueSemiCondensed: |
+ return FontStretchSemiCondensed; |
+ case CSSValueNormal: |
+ return FontStretchNormal; |
+ case CSSValueSemiExpanded: |
+ return FontStretchSemiExpanded; |
+ case CSSValueExpanded: |
+ return FontStretchExpanded; |
+ case CSSValueExtraExpanded: |
+ return FontStretchExtraExpanded; |
+ case CSSValueUltraExpanded: |
+ return FontStretchUltraExpanded; |
+ default: |
+ break; |
+ } |
+ |
+ ASSERT_NOT_REACHED(); |
+ return FontStretchNormal; |
+} |
+ |
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontItalic italic) |
: CSSValue(PrimitiveClass) |
{ |