Index: Source/core/css/CSSPrimitiveValue.h |
diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h |
index 3f7b65ed10fa47ffdcee0ea063f26b3bc7687402..7f3cbc667d815fa4d2faf87a3699fdb35f47d874 100644 |
--- a/Source/core/css/CSSPrimitiveValue.h |
+++ b/Source/core/css/CSSPrimitiveValue.h |
@@ -38,6 +38,7 @@ namespace blink { |
class CSSBasicShape; |
class CSSCalcValue; |
class CSSToLengthConversionData; |
+class CSSVariableData; |
class Counter; |
class Length; |
class LengthSize; |
@@ -119,7 +120,8 @@ public: |
CSS_STRING = 116, |
CSS_PROPERTY_ID = 117, |
CSS_VALUE_ID = 118, |
- CSS_QEM = 119 |
+ CSS_QEM = 119, |
+ CSS_VARIABLE_REFERENCE = 120 |
}; |
enum LengthUnitType { |
@@ -233,6 +235,10 @@ public: |
{ |
return adoptRefWillBeNoop(new CSSPrimitiveValue(value, style)); |
} |
+ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(CSSVariableData* value) |
+ { |
+ return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); |
+ } |
template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(T value) |
{ |
return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); |
@@ -285,6 +291,8 @@ public: |
CSSCalcValue* cssCalcValue() const { return m_primitiveUnitType != CSS_CALC ? 0 : m_value.calc; } |
+ CSSVariableData* getVariableDataValue() const { return m_primitiveUnitType != CSS_VARIABLE_REFERENCE ? 0 : m_value.variableData; } |
Timothy Loh
2015/07/23 08:11:46
Better to ASSERT type is variable and always retur
leviw_travelin_and_unemployed
2015/08/04 00:42:20
Every other method in the file follows the other c
|
+ |
CSSPropertyID getPropertyID() const { return m_primitiveUnitType == CSS_PROPERTY_ID ? m_value.propertyID : CSSPropertyInvalid; } |
CSSValueID getValueID() const { return m_primitiveUnitType == CSS_VALUE_ID ? m_value.valueID : CSSValueInvalid; } |
@@ -314,6 +322,7 @@ private: |
CSSPrimitiveValue(const LengthSize&, const ComputedStyle&); |
CSSPrimitiveValue(const String&, UnitType); |
CSSPrimitiveValue(double, UnitType); |
+ CSSPrimitiveValue(CSSVariableData*); |
template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMappings.h |
template<typename T> CSSPrimitiveValue(T* val) |
@@ -356,6 +365,7 @@ private: |
Pair* pair; |
Rect* rect; |
Quad* quad; |
+ CSSVariableData* variableData; |
} m_value; |
}; |