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

Unified Diff: Source/core/animation/KeyframeAnimationEffect.cpp

Issue 22707006: Web Animations CSS: Assert underlying value is not used (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review changes Created 7 years, 4 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/animation/AnimationEffect.h ('k') | Source/core/animation/KeyframeAnimationEffectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeAnimationEffect.cpp
diff --git a/Source/core/animation/KeyframeAnimationEffect.cpp b/Source/core/animation/KeyframeAnimationEffect.cpp
index cc5063c0ab260ece63f3ad9cdef984c3eefaeff2..a9cc771c48b16a2983b991bc1808694e01a5ff6d 100644
--- a/Source/core/animation/KeyframeAnimationEffect.cpp
+++ b/Source/core/animation/KeyframeAnimationEffect.cpp
@@ -44,6 +44,10 @@ public:
{
return adoptRef(new ReplaceCompositableValue(value));
}
+ virtual bool dependsOnUnderlyingValue() const
+ {
+ return false;
+ }
virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue* underlyingValue) const
{
return PassRefPtr<AnimatableValue>(m_value);
@@ -62,6 +66,10 @@ public:
{
return adoptRef(new AddCompositableValue(value));
}
+ virtual bool dependsOnUnderlyingValue() const
+ {
+ return true;
+ }
virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue* underlyingValue) const
{
return AnimatableValue::add(underlyingValue, m_value.get());
@@ -80,6 +88,10 @@ public:
{
return adoptRef(new BlendedCompositableValue(before, after, fraction));
}
+ virtual bool dependsOnUnderlyingValue() const
+ {
+ return m_dependsOnUnderlyingValue;
+ }
virtual PassRefPtr<AnimatableValue> compositeOnto(const AnimatableValue* underlyingValue) const
{
return AnimatableValue::interpolate(m_before->compositeOnto(underlyingValue).get(), m_after->compositeOnto(underlyingValue).get(), m_fraction);
@@ -89,10 +101,12 @@ private:
: m_before(const_cast<AnimationEffect::CompositableValue*>(before))
, m_after(const_cast<AnimationEffect::CompositableValue*>(after))
, m_fraction(fraction)
+ , m_dependsOnUnderlyingValue(before->dependsOnUnderlyingValue() || after->dependsOnUnderlyingValue())
{ }
RefPtr<AnimationEffect::CompositableValue> m_before;
RefPtr<AnimationEffect::CompositableValue> m_after;
double m_fraction;
+ bool m_dependsOnUnderlyingValue;
};
} // namespace
« no previous file with comments | « Source/core/animation/AnimationEffect.h ('k') | Source/core/animation/KeyframeAnimationEffectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698