Index: Source/core/svg/SVGViewElement.cpp |
diff --git a/Source/core/svg/SVGViewElement.cpp b/Source/core/svg/SVGViewElement.cpp |
index 08fb4804870854c2535d1fc50e1609270eaf704c..c4254c0fe0b0d7b7916223599578ea27ad4080f6 100644 |
--- a/Source/core/svg/SVGViewElement.cpp |
+++ b/Source/core/svg/SVGViewElement.cpp |
@@ -32,15 +32,12 @@ END_REGISTER_ANIMATED_PROPERTIES |
inline SVGViewElement::SVGViewElement(Document& document) |
: SVGElement(SVGNames::viewTag, document) |
- , m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr)) |
- , m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
+ , SVGFitToViewBox(this) |
, m_viewTarget(SVGStaticStringList::create(this, SVGNames::viewTargetAttr)) |
, m_zoomAndPan(SVGZoomAndPanMagnify) |
{ |
ScriptWrappable::init(this); |
- addToPropertyMap(m_viewBox); |
- addToPropertyMap(m_preserveAspectRatio); |
addToPropertyMap(m_viewTarget); |
registerAnimatedPropertiesForSVGViewElement(); |
} |
@@ -68,17 +65,15 @@ void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicStrin |
return; |
} |
- if (SVGFitToViewBox::parseAttribute(this, name, value)) |
- return; |
- if (SVGZoomAndPan::parseAttribute(this, name, value)) |
- return; |
- |
SVGParsingError parseError = NoError; |
- if (name == SVGNames::viewTargetAttr) |
+ if (SVGFitToViewBox::parseAttribute(name, value, document(), parseError)) { |
+ } else if (SVGZoomAndPan::parseAttribute(this, name, value)) { |
+ } else if (name == SVGNames::viewTargetAttr) { |
m_viewTarget->setBaseValueAsString(value, parseError); |
- else |
+ } else { |
ASSERT_NOT_REACHED(); |
+ } |
reportAttributeParsingError(parseError, name, value); |
} |