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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimatedAngle.cpp

Issue 1739533004: Fix synchronization of SVGAnimatedAngle (<marker orient>) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows compilation fix Created 4 years, 10 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 | « third_party/WebKit/Source/core/svg/SVGAnimatedAngle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimatedAngle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698