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

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: add comments explaining purpose 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
« no previous file with comments | « Source/core/svg/SVGFitToViewBox.h ('k') | Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/svg/SVGFitToViewBox.h ('k') | Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698