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

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

Issue 190763007: [WIP] Web Animations API: Constructing an Animation from partial keyframes throws a JS exception (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace manual checks with check for dependsOnUnderlyingValue Created 6 years, 9 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/KeyframeEffectModel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffectModel.cpp
diff --git a/Source/core/animation/KeyframeEffectModel.cpp b/Source/core/animation/KeyframeEffectModel.cpp
index 33f66270f3a46ab72c5a576ef831393bdf1dc452..0a3da176e4a676de16963872151b5a0ecd7d6974 100644
--- a/Source/core/animation/KeyframeEffectModel.cpp
+++ b/Source/core/animation/KeyframeEffectModel.cpp
@@ -268,6 +268,19 @@ void KeyframeEffectModel::ensureKeyframeGroups() const
}
}
+bool KeyframeEffectModel::isReplaceOnly()
+{
+ ensureKeyframeGroups();
+ for (KeyframeGroupMap::iterator iter = m_keyframeGroups->begin(); iter != m_keyframeGroups->end(); ++iter) {
+ const PropertySpecificKeyframeVector& keyframeVector = iter->value->keyframes();
+ for (size_t i = 0; i < keyframeVector.size(); ++i) {
+ if (keyframeVector[i]->value()->dependsOnUnderlyingValue()) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
KeyframeEffectModel::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, CompositeOperation composite)
: m_offset(offset)
« no previous file with comments | « Source/core/animation/KeyframeEffectModel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698