Changeset 120154 in webkit for trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
- Timestamp:
- Jun 12, 2012, 8:31:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r119984 r120154 106 106 case CSSPrimitiveValue:: CSS_UNKNOWN: 107 107 case CSSPrimitiveValue:: CSS_URI: 108 #if ENABLE(CSS_VARIABLES) 109 case CSSPrimitiveValue:: CSS_VARIABLE_NAME: 110 #endif 108 111 return false; 109 112 } … … 712 715 case CSS_ATTR: 713 716 case CSS_URI: 717 #if ENABLE(CSS_VARIABLES) 718 case CSS_VARIABLE_NAME: 719 #endif 714 720 return m_value.string; 715 721 case CSS_IDENT: … … 729 735 case CSS_ATTR: 730 736 case CSS_URI: 731 return m_value.string; 737 #if ENABLE(CSS_VARIABLES) 738 case CSS_VARIABLE_NAME: 739 #endif 740 return m_value.string; 732 741 case CSS_IDENT: 733 742 return valueOrPropertyName(m_value.ident); … … 1076 1085 text = formatNumber(m_value.num) + "vmin"; 1077 1086 break; 1087 #if ENABLE(CSS_VARIABLES) 1088 case CSS_VARIABLE_NAME: 1089 text = "-webkit-var("; 1090 text += m_value.string; 1091 text += ")"; 1092 break; 1093 #endif 1078 1094 } 1079 1095 … … 1083 1099 return text; 1084 1100 } 1101 1102 #if ENABLE(CSS_VARIABLES) 1103 String CSSPrimitiveValue::customSerializeResolvingVariables(const HashMap<AtomicString, String>& variables) const 1104 { 1105 if (m_primitiveUnitType == CSS_VARIABLE_NAME && variables.contains(m_value.string)) 1106 return variables.get(m_value.string); 1107 return customCssText(); 1108 } 1109 #endif 1085 1110 1086 1111 void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
Note:
See TracChangeset
for help on using the changeset viewer.