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

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

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove debug print Created 6 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/SVGViewElement.h ('k') | Source/core/svg/properties/NewSVGAnimatedProperty.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGViewElement.cpp
diff --git a/Source/core/svg/SVGViewElement.cpp b/Source/core/svg/SVGViewElement.cpp
index b991e0d1e4f02f6d918752f434373934b7f1462d..08fb4804870854c2535d1fc50e1609270eaf704c 100644
--- a/Source/core/svg/SVGViewElement.cpp
+++ b/Source/core/svg/SVGViewElement.cpp
@@ -22,7 +22,6 @@
#include "core/svg/SVGViewElement.h"
-
namespace WebCore {
// Animated property definitions
@@ -35,13 +34,14 @@ 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()))
+ , m_viewTarget(SVGStaticStringList::create(this, SVGNames::viewTargetAttr))
, m_zoomAndPan(SVGZoomAndPanMagnify)
- , m_viewTarget(SVGNames::viewTargetAttr)
{
ScriptWrappable::init(this);
addToPropertyMap(m_viewBox);
addToPropertyMap(m_preserveAspectRatio);
+ addToPropertyMap(m_viewTarget);
registerAnimatedPropertiesForSVGViewElement();
}
@@ -68,17 +68,19 @@ void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicStrin
return;
}
- if (name == SVGNames::viewTargetAttr) {
- viewTarget().reset(value);
- return;
- }
-
if (SVGFitToViewBox::parseAttribute(this, name, value))
return;
if (SVGZoomAndPan::parseAttribute(this, name, value))
return;
- ASSERT_NOT_REACHED();
+ SVGParsingError parseError = NoError;
+
+ if (name == SVGNames::viewTargetAttr)
+ m_viewTarget->setBaseValueAsString(value, parseError);
+ else
+ ASSERT_NOT_REACHED();
+
+ reportAttributeParsingError(parseError, name, value);
}
}
« no previous file with comments | « Source/core/svg/SVGViewElement.h ('k') | Source/core/svg/properties/NewSVGAnimatedProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698