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

Unified Diff: Source/core/svg/properties/NewSVGAnimatedProperty.cpp

Issue 131253002: [SVG] SVGAnimatedBoolean migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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/properties/NewSVGAnimatedProperty.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/NewSVGAnimatedProperty.cpp
diff --git a/Source/core/svg/properties/NewSVGAnimatedProperty.cpp b/Source/core/svg/properties/NewSVGAnimatedProperty.cpp
index 4065bcc03e218c3057ab14a7e9a75f73b88e8a4b..af64b7a5b0586afbf37580dd75c3a668419c93ed 100644
--- a/Source/core/svg/properties/NewSVGAnimatedProperty.cpp
+++ b/Source/core/svg/properties/NewSVGAnimatedProperty.cpp
@@ -37,14 +37,41 @@ namespace WebCore {
NewSVGAnimatedPropertyBase::NewSVGAnimatedPropertyBase(AnimatedPropertyType type, SVGElement* contextElement, const QualifiedName& attributeName)
: m_type(type)
+ , m_isReadOnly(false)
+ , m_isAnimating(false)
, m_contextElement(contextElement)
, m_attributeName(attributeName)
{
- contextElement->setContextElement();
+ ASSERT(m_contextElement);
+ ASSERT(m_attributeName != nullQName());
+ m_contextElement->setContextElement();
}
NewSVGAnimatedPropertyBase::~NewSVGAnimatedPropertyBase()
{
+ ASSERT(!isAnimating());
+}
+
+void NewSVGAnimatedPropertyBase::animationStarted()
+{
+ ASSERT(!isAnimating());
+ m_isAnimating = true;
+}
+
+void NewSVGAnimatedPropertyBase::animValWillChange()
+{
+ ASSERT(isAnimating());
+}
+
+void NewSVGAnimatedPropertyBase::animValDidChange()
+{
+ ASSERT(isAnimating());
+}
+
+void NewSVGAnimatedPropertyBase::animationEnded()
+{
+ ASSERT(isAnimating());
+ m_isAnimating = false;
}
void NewSVGAnimatedPropertyBase::synchronizeAttribute()
@@ -54,4 +81,10 @@ void NewSVGAnimatedPropertyBase::synchronizeAttribute()
m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value);
}
+void NewSVGAnimatedPropertyBase::commitChange()
+{
+ contextElement()->invalidateSVGAttributes();
+ contextElement()->svgAttributeChanged(m_attributeName);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/svg/properties/NewSVGAnimatedProperty.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698