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

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

Issue 132233010: [SVG] SVGAnimatedRect migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebsaed 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/SVGMarkerElement.h ('k') | Source/core/svg/SVGPathElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGMarkerElement.cpp
diff --git a/Source/core/svg/SVGMarkerElement.cpp b/Source/core/svg/SVGMarkerElement.cpp
index 5928685e0b84ab44ddd3f463aa57d846e9e357f6..fb8cbf8878aa07dff977582883803f5bafcacc38 100644
--- a/Source/core/svg/SVGMarkerElement.cpp
+++ b/Source/core/svg/SVGMarkerElement.cpp
@@ -47,14 +47,12 @@ const SVGPropertyInfo* SVGMarkerElement::orientTypePropertyInfo()
// Animated property definitions
DEFINE_ANIMATED_ENUMERATION(SVGMarkerElement, SVGNames::markerUnitsAttr, MarkerUnits, markerUnits, SVGMarkerUnitsType)
DEFINE_ANIMATED_ANGLE_AND_ENUMERATION(SVGMarkerElement, SVGNames::orientAttr, orientAngleIdentifier(), OrientAngle, orientAngle)
-DEFINE_ANIMATED_RECT(SVGMarkerElement, SVGNames::viewBoxAttr, ViewBox, viewBox)
DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio)
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMarkerElement)
REGISTER_LOCAL_ANIMATED_PROPERTY(markerUnits)
REGISTER_LOCAL_ANIMATED_PROPERTY(orientAngle)
REGISTER_LOCAL_ANIMATED_PROPERTY(orientType)
- REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
END_REGISTER_ANIMATED_PROPERTIES
@@ -65,6 +63,7 @@ inline SVGMarkerElement::SVGMarkerElement(Document& document)
, m_refY(SVGAnimatedLength::create(this, SVGNames::refXAttr, SVGLength::create(LengthModeWidth)))
, m_markerWidth(SVGAnimatedLength::create(this, SVGNames::markerWidthAttr, SVGLength::create(LengthModeWidth)))
, m_markerHeight(SVGAnimatedLength::create(this, SVGNames::markerHeightAttr, SVGLength::create(LengthModeHeight)))
+ , m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr))
, m_orientType(SVGMarkerOrientAngle)
, m_markerUnits(SVGMarkerUnitsStrokeWidth)
{
@@ -78,6 +77,7 @@ inline SVGMarkerElement::SVGMarkerElement(Document& document)
addToPropertyMap(m_refY);
addToPropertyMap(m_markerWidth);
addToPropertyMap(m_markerHeight);
+ addToPropertyMap(m_viewBox);
registerAnimatedPropertiesForSVGMarkerElement();
}
@@ -101,7 +101,7 @@ const AtomicString& SVGMarkerElement::orientAngleIdentifier()
AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
{
- return SVGFitToViewBox::viewBoxToViewTransform(viewBoxCurrentValue(), preserveAspectRatioCurrentValue(), viewWidth, viewHeight);
+ return SVGFitToViewBox::viewBoxToViewTransform(m_viewBox->currentValue()->value(), preserveAspectRatioCurrentValue(), viewWidth, viewHeight);
}
bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
« no previous file with comments | « Source/core/svg/SVGMarkerElement.h ('k') | Source/core/svg/SVGPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698