Index: Source/core/css/CSSPrimitiveValue.cpp |
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp |
index ff8dfa72a5c34d5d6359a3c706946a0fa64400cc..3dda4e87b2be7537ae23016e6da93eebc3eab32d 100644 |
--- a/Source/core/css/CSSPrimitiveValue.cpp |
+++ b/Source/core/css/CSSPrimitiveValue.cpp |
@@ -301,6 +301,12 @@ CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize) |
init(lengthSize); |
} |
+CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize, const RenderStyle& style) |
+ : CSSValue(PrimitiveClass) |
+{ |
+ init(lengthSize, style); |
+} |
+ |
CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitTypes type) |
: CSSValue(PrimitiveClass) |
{ |
@@ -415,6 +421,13 @@ void CSSPrimitiveValue::init(const LengthSize& lengthSize) |
m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.height()), Pair::KeepIdenticalValues).leakRef(); |
} |
+void CSSPrimitiveValue::init(const LengthSize& lengthSize, const RenderStyle& style) |
+{ |
+ m_primitiveUnitType = CSS_PAIR; |
+ m_hasCachedCSSText = false; |
+ m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom()), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues).leakRef(); |
+} |
+ |
void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) |
{ |
m_primitiveUnitType = CSS_COUNTER; |