Index: third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp b/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp |
index 6e4fe1d988ba0e739174e991655e6d77d4f94ae3..004e96b86bbe8d40268c8997c34ec24b70bb5970 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp |
@@ -31,12 +31,10 @@ |
#include "core/svg/SVGAnimatedAngle.h" |
#include "core/SVGNames.h" |
-#include "core/svg/SVGAngleTearOff.h" |
-#include "core/svg/SVGMarkerElement.h" |
namespace blink { |
-SVGAnimatedAngle::SVGAnimatedAngle(SVGMarkerElement* contextElement) |
+SVGAnimatedAngle::SVGAnimatedAngle(SVGElement* contextElement) |
: SVGAnimatedProperty<SVGAngle>(contextElement, SVGNames::orientAttr, SVGAngle::create()) |
, m_orientType(SVGAnimatedEnumeration<SVGMarkerOrientType>::create(contextElement, SVGNames::orientAttr, baseValue()->orientType())) |
{ |
@@ -52,16 +50,21 @@ DEFINE_TRACE(SVGAnimatedAngle) |
SVGAnimatedProperty<SVGAngle>::trace(visitor); |
} |
-void SVGAnimatedAngle::synchronizeAttribute() |
+bool SVGAnimatedAngle::needsSynchronizeAttribute() |
{ |
- DEFINE_STATIC_LOCAL(const AtomicString, autoValue, ("auto", AtomicString::ConstructFromLiteral)); |
- AtomicString value; |
- if (m_orientType->currentValue()->enumValue() == SVGMarkerOrientAuto) |
- value = autoValue; |
- else |
- value = AtomicString(currentValue()->valueAsString()); |
+ return m_orientType->needsSynchronizeAttribute() |
+ || SVGAnimatedProperty<SVGAngle>::needsSynchronizeAttribute(); |
+} |
- contextElement()->setSynchronizedLazyAttribute(attributeName(), value); |
+void SVGAnimatedAngle::synchronizeAttribute() |
+{ |
+ // If the current value is not an <angle> we synchronize the value of the |
+ // wrapped enumeration. |
+ if (m_orientType->currentValue()->enumValue() != SVGMarkerOrientAngle) { |
+ m_orientType->synchronizeAttribute(); |
+ return; |
+ } |
+ SVGAnimatedProperty<SVGAngle>::synchronizeAttribute(); |
} |
void SVGAnimatedAngle::setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase> value) |