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

Unified Diff: third_party/WebKit/Source/core/animation/TimingCalculations.h

Issue 1933113002: Web Animations: Clip animation active intervals if endDelay is negative (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/KeyframeEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/TimingCalculations.h
diff --git a/third_party/WebKit/Source/core/animation/TimingCalculations.h b/third_party/WebKit/Source/core/animation/TimingCalculations.h
index 792b213903ab2a40eb5a4d1083c10ae70cd7b017..d3e3c9a9142c4283a405c68339f3154cf98cd494 100644
--- a/third_party/WebKit/Source/core/animation/TimingCalculations.h
+++ b/third_party/WebKit/Source/core/animation/TimingCalculations.h
@@ -50,9 +50,10 @@ static inline AnimationEffect::Phase calculatePhase(double activeDuration, doubl
ASSERT(activeDuration >= 0);
if (isNull(localTime))
return AnimationEffect::PhaseNone;
- if (localTime < specified.startDelay)
+ double endTime = specified.startDelay + activeDuration + specified.endDelay;
+ if (localTime < std::min(specified.startDelay, endTime))
return AnimationEffect::PhaseBefore;
- if (localTime >= specified.startDelay + activeDuration)
+ if (localTime >= std::min(specified.startDelay + activeDuration, endTime))
return AnimationEffect::PhaseAfter;
return AnimationEffect::PhaseActive;
}
« no previous file with comments | « third_party/WebKit/Source/core/animation/KeyframeEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698