Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Unified Diff: Source/core/svg/SVGFitToViewBox.cpp

Issue 860063002: Initialize GC mixin bases only when leftmost vtable has been initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGFitToViewBox.cpp
diff --git a/Source/core/svg/SVGFitToViewBox.cpp b/Source/core/svg/SVGFitToViewBox.cpp
index 4bb1746d648a36625466cfd952dd6b4b7852f7b8..81f42c998ca190a1beb9772cd3317444e9190b13 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.get());
+ ASSERT(!m_preserveAspectRatio.get());
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);

Powered by Google App Engine
This is Rietveld 408576698