Index: Source/core/svg/SVGAngle.cpp |
diff --git a/Source/core/svg/SVGAngle.cpp b/Source/core/svg/SVGAngle.cpp |
index 6e9b816819f8db8049f2b6e65674865cb1c1b4a9..d47ca1a4f9c26e6b411347f9cae3f85832949e75 100644 |
--- a/Source/core/svg/SVGAngle.cpp |
+++ b/Source/core/svg/SVGAngle.cpp |
@@ -38,10 +38,16 @@ template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGMarkerOr |
if (entries.isEmpty()) { |
entries.append(std::make_pair(SVGMarkerOrientAuto, "auto")); |
entries.append(std::make_pair(SVGMarkerOrientAngle, "angle")); |
+ entries.append(std::make_pair(SVGMarkerOrientAutoStartReverse, "auto-start-reverse")); |
} |
return entries; |
} |
+template<> unsigned short getMaxExposedEnumValue<SVGMarkerOrientType>() |
+{ |
+ return SVGMarkerOrientAngle; |
+} |
+ |
SVGMarkerOrientEnumeration::SVGMarkerOrientEnumeration(SVGAngle* angle) |
: SVGEnumeration<SVGMarkerOrientType>(SVGMarkerOrientAngle) |
, m_angle(angle) |
@@ -231,6 +237,11 @@ void SVGAngle::setValueAsString(const String& value, ExceptionState& exceptionSt |
m_orientType->setEnumValue(SVGMarkerOrientAuto); |
return; |
} |
+ if (value == "auto-start-reverse") { |
+ newValueSpecifiedUnits(SVG_ANGLETYPE_UNSPECIFIED, 0); |
+ m_orientType->setEnumValue(SVGMarkerOrientAutoStartReverse); |
+ return; |
+ } |
float valueInSpecifiedUnits = 0; |
SVGAngleType unitType = SVG_ANGLETYPE_UNKNOWN; |
@@ -376,12 +387,12 @@ void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, flo |
// Animating from eg. auto to 90deg, or auto to 90deg. |
if (fromOrientType == SVGMarkerOrientAngle) { |
// Animating from an angle value to eg. 'auto' - this disabled additive as 'auto' is a keyword.. |
- if (toOrientType == SVGMarkerOrientAuto) { |
+ if (toOrientType == SVGMarkerOrientAuto || toOrientType == SVGMarkerOrientAutoStartReverse) { |
if (percentage < 0.5f) { |
newValueSpecifiedUnits(fromAngle->unitType(), fromAngle->valueInSpecifiedUnits()); |
return; |
} |
- orientType()->setEnumValue(SVGMarkerOrientAuto); |
+ orientType()->setEnumValue(toOrientType); |
return; |
} |
m_valueInSpecifiedUnits = 0; |
@@ -391,9 +402,9 @@ void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, flo |
} |
// From 'auto' to 'auto'. |
- if (fromOrientType == SVGMarkerOrientAuto) { |
+ if (fromOrientType == SVGMarkerOrientAuto || fromOrientType == SVGMarkerOrientAutoStartReverse) { |
fs
2014/09/08 15:31:41
What about 'auto' <-> 'auto-start-reverse'? (Looks
Erik Dahlström (inactive)
2014/09/09 09:25:07
Done.
|
m_valueInSpecifiedUnits = 0; |
- orientType()->setEnumValue(SVGMarkerOrientAuto); |
+ orientType()->setEnumValue(fromOrientType); |
return; |
} |
@@ -418,7 +429,7 @@ float SVGAngle::calculateDistance(PassRefPtr<SVGPropertyBase> other, SVGElement* |
void SVGAngle::orientTypeChanged() |
{ |
- if (orientType()->enumValue() == SVGMarkerOrientAuto) { |
+ if (orientType()->enumValue() == SVGMarkerOrientAuto || orientType()->enumValue() == SVGMarkerOrientAutoStartReverse) { |
m_unitType = SVG_ANGLETYPE_UNSPECIFIED; |
m_valueInSpecifiedUnits = 0; |
} |