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

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

Issue 28263002: Plumb timeToNextEffect through players and animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index d48b39a4f93c5485996b26583786688c2f833723..e427c631e6d9517d7a785c31a86894c09f46e7c0 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -91,4 +91,22 @@ void Animation::updateChildrenAndEffects(bool wasInEffect) const
const_cast<Animation*>(this)->clearEffects();
}
+double Animation::calculateTimeToEffectChange(double inheritedTime, double activeTime, Phase phase) const
+{
+ if (phase == PhaseBefore) {
+ return activeTime - inheritedTime;
+ }
+ if (phase == PhaseActive) {
+ return 0;
+ }
+ if (phase == PhaseAfter) {
+ // If this Animation is still in effect then it will need to update
+ // when its parent goes out of effect. We have no way of knowing when
+ // that will be, however, so the parent will need to supply it.
+ return -1;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698