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

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp

Issue 1944603003: Make AnimationEffectReadOnly.getComputedTiming() consistent with Web Animations spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 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: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index e357d4bee23f5a46c416002366bea6b4e10e4428..a3b550bd8c96a0cc73c759d5b9a18fb11c745108 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -539,12 +539,12 @@ void CSSAnimations::calculateTransitionUpdateForProperty(CSSPropertyID id, const
AnimatableValue* reversingAdjustedStartValue = from.get();
double reversingShorteningFactor = 1;
if (interruptedTransition) {
- const double interruptedTimeFraction = interruptedTransition->animation->effect()->timeFraction();
- if (!std::isnan(interruptedTimeFraction)) {
+ const double interruptedProgress = interruptedTransition->animation->effect()->progress();
+ if (!std::isnan(interruptedProgress)) {
// const_cast because we need to take a ref later when passing to startTransition.
reversingAdjustedStartValue = const_cast<AnimatableValue*>(interruptedTransition->to);
reversingShorteningFactor = clampTo(
- (interruptedTimeFraction * interruptedTransition->reversingShorteningFactor) +
+ (interruptedProgress * interruptedTransition->reversingShorteningFactor) +
(1 - interruptedTransition->reversingShorteningFactor), 0.0, 1.0);
timing.iterationDuration *= reversingShorteningFactor;
if (timing.startDelay < 0) {

Powered by Google App Engine
This is Rietveld 408576698