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

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

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use new API in layout tests Created 5 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: Source/core/animation/AnimationStack.cpp
diff --git a/Source/core/animation/AnimationStack.cpp b/Source/core/animation/AnimationStack.cpp
index c090d3bbe21bb92851f82f1b4cb09e93348999aa..562f45496285a44985861b1f61f613c403d90227 100644
--- a/Source/core/animation/AnimationStack.cpp
+++ b/Source/core/animation/AnimationStack.cpp
@@ -74,13 +74,13 @@ AnimationStack::AnimationStack()
bool AnimationStack::hasActiveAnimationsOnCompositor(CSSPropertyID property) const
{
for (const auto& effect : m_effects) {
- if (effect->animation() && effect->animation()->hasActiveAnimationsOnCompositor(property))
+ if (effect->effect() && effect->effect()->hasActiveAnimationsOnCompositor(property))
return true;
}
return false;
}
-ActiveInterpolationMap AnimationStack::activeInterpolations(AnimationStack* animationStack, const WillBeHeapVector<RawPtrWillBeMember<InertAnimation>>* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>>* suppressedAnimationPlayers, Animation::Priority priority, double timelineCurrentTime)
+ActiveInterpolationMap AnimationStack::activeInterpolations(AnimationStack* animationStack, const WillBeHeapVector<RawPtrWillBeMember<InertAnimation>>* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<const Animation>>* suppressedAnimations, KeyframeEffect::Priority priority, double timelineCurrentTime)
{
// We don't exactly know when new animations will start, but timelineCurrentTime is a good estimate.
@@ -91,7 +91,7 @@ ActiveInterpolationMap AnimationStack::activeInterpolations(AnimationStack* anim
// std::sort doesn't work with OwnPtrs
nonCopyingSort(effects.begin(), effects.end(), compareEffects);
for (const auto& effect : effects) {
- if (effect->priority() != priority || (suppressedAnimationPlayers && effect->animation() && suppressedAnimationPlayers->contains(effect->animation()->player())))
+ if (effect->priority() != priority || (suppressedAnimations && effect->effect() && suppressedAnimations->contains(effect->effect()->animation())))
continue;
copyToActiveInterpolationMap(effect->interpolations(), result);
}
@@ -111,17 +111,15 @@ DEFINE_TRACE(AnimationStack)
bool AnimationStack::getAnimatedBoundingBox(FloatBox& box, CSSPropertyID property) const
{
FloatBox originalBox(box);
- for (const auto& effect : m_effects) {
- if (effect->animation() && effect->animation()->affects(PropertyHandle(property))) {
- Animation* anim = effect->animation();
- if (!anim)
- continue;
- const Timing& timing = anim->specifiedTiming();
+ for (const auto& sampledEffect : m_effects) {
+ if (sampledEffect->effect() && sampledEffect->effect()->affects(PropertyHandle(property))) {
+ KeyframeEffect* effect = sampledEffect->effect();
+ const Timing& timing = effect->specifiedTiming();
double startRange = 0;
double endRange = 1;
timing.timingFunction->range(&startRange, &endRange);
FloatBox expandingBox(originalBox);
- if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expandingBox, *anim->effect(), startRange, endRange))
+ if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expandingBox, *effect->effect(), startRange, endRange))
return false;
box.expandTo(expandingBox);
}

Powered by Google App Engine
This is Rietveld 408576698