Index: Source/core/svg/SVGFitToViewBox.cpp |
diff --git a/Source/core/svg/SVGFitToViewBox.cpp b/Source/core/svg/SVGFitToViewBox.cpp |
index 4bb1746d648a36625466cfd952dd6b4b7852f7b8..f153fb63bb43a52b176fbd709940fec835895ecc 100644 |
--- a/Source/core/svg/SVGFitToViewBox.cpp |
+++ b/Source/core/svg/SVGFitToViewBox.cpp |
@@ -66,11 +66,19 @@ void SVGAnimatedViewBoxRect::setBaseValueAsString(const String& value, SVGParsin |
} |
} |
-SVGFitToViewBox::SVGFitToViewBox(SVGElement* element, PropertyMapPolicy propertyMapPolicy) |
- : m_viewBox(SVGAnimatedViewBoxRect::create(element)) |
- , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(element, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
+SVGFitToViewBox::SVGFitToViewBox() |
{ |
+} |
+ |
+void SVGFitToViewBox::initialize(SVGElement* element, PropertyMapPolicy propertyMapPolicy) |
+{ |
+ ASSERT(!m_viewBox); |
+ ASSERT(!m_preserveAspectRatio); |
ASSERT(element); |
+ |
+ m_viewBox = SVGAnimatedViewBoxRect::create(element); |
+ m_preserveAspectRatio = SVGAnimatedPreserveAspectRatio::create(element, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create()); |
+ |
if (propertyMapPolicy == PropertyMapPolicyAdd) { |
element->addToPropertyMap(m_viewBox); |
element->addToPropertyMap(m_preserveAspectRatio); |