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

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

Issue 2369833002: Introduce KeyframeEffectReadOnly interface (Closed)
Patch Set: Update references to Priority, response to review Created 4 years, 3 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 f5f3fc0f9e1ecde24f85d2337b2c1f2f81ea66fa..20fa2fc0763fbd60a8f5187b559ec7480a6f497d 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -37,7 +37,9 @@
#include "core/animation/ElementAnimations.h"
#include "core/animation/InertEffect.h"
#include "core/animation/Interpolation.h"
+#include "core/animation/KeyframeEffect.h"
#include "core/animation/KeyframeEffectModel.h"
+#include "core/animation/KeyframeEffectReadOnly.h"
#include "core/animation/LegacyStyleInterpolation.h"
#include "core/animation/css/CSSAnimatableValueFactory.h"
#include "core/css/CSSKeyframeRule.h"
@@ -430,7 +432,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
for (const auto& entry : m_pendingUpdate.newAnimations()) {
const InertEffect* inertAnimation = entry.effect.get();
AnimationEventDelegate* eventDelegate = new AnimationEventDelegate(element, entry.name);
- KeyframeEffect* effect = KeyframeEffect::create(element, inertAnimation->model(), inertAnimation->specifiedTiming(), KeyframeEffect::DefaultPriority, eventDelegate);
+ KeyframeEffect* effect = KeyframeEffect::create(element, inertAnimation->model(), inertAnimation->specifiedTiming(), KeyframeEffectReadOnly::DefaultPriority, eventDelegate);
Animation* animation = element->document().timeline().play(effect);
animation->setId(entry.name);
if (inertAnimation->paused())
@@ -513,7 +515,7 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
}
}
- KeyframeEffect* transition = KeyframeEffect::create(element, model, inertAnimation->specifiedTiming(), KeyframeEffect::TransitionPriority, eventDelegate);
+ KeyframeEffect* transition = KeyframeEffect::create(element, model, inertAnimation->specifiedTiming(), KeyframeEffectReadOnly::TransitionPriority, eventDelegate);
Animation* animation = element->document().timeline().play(transition);
animation->setId(getPropertyName(newTransition.id));
// Set the current time as the start time for retargeted transitions
@@ -716,7 +718,7 @@ void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate& u
AnimationStack* animationStack = elementAnimations ? &elementAnimations->animationStack() : nullptr;
if (update.newAnimations().isEmpty() && update.suppressedAnimations().isEmpty()) {
- ActiveInterpolationsMap activeInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, nullptr, nullptr, KeyframeEffect::DefaultPriority, isStylePropertyHandle));
+ ActiveInterpolationsMap activeInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, nullptr, nullptr, KeyframeEffectReadOnly::DefaultPriority, isStylePropertyHandle));
update.adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimations);
return;
}
@@ -727,7 +729,7 @@ void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate& u
for (const auto& updatedAnimation : update.animationsWithUpdates())
newEffects.append(updatedAnimation.effect); // Animations with updates use a temporary InertEffect for the current frame.
- ActiveInterpolationsMap activeInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, &newEffects, &update.suppressedAnimations(), KeyframeEffect::DefaultPriority, isStylePropertyHandle));
+ ActiveInterpolationsMap activeInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, &newEffects, &update.suppressedAnimations(), KeyframeEffectReadOnly::DefaultPriority, isStylePropertyHandle));
update.adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimations);
}
@@ -738,7 +740,7 @@ void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate&
ActiveInterpolationsMap activeInterpolationsForTransitions;
if (update.newTransitions().isEmpty() && update.cancelledTransitions().isEmpty()) {
- activeInterpolationsForTransitions = AnimationStack::activeInterpolations(animationStack, nullptr, nullptr, KeyframeEffect::TransitionPriority, isStylePropertyHandle);
+ activeInterpolationsForTransitions = AnimationStack::activeInterpolations(animationStack, nullptr, nullptr, KeyframeEffectReadOnly::TransitionPriority, isStylePropertyHandle);
} else {
HeapVector<Member<const InertEffect>> newTransitions;
for (const auto& entry : update.newTransitions())
@@ -754,7 +756,7 @@ void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate&
}
}
- activeInterpolationsForTransitions = AnimationStack::activeInterpolations(animationStack, &newTransitions, &cancelledAnimations, KeyframeEffect::TransitionPriority, isStylePropertyHandle);
+ activeInterpolationsForTransitions = AnimationStack::activeInterpolations(animationStack, &newTransitions, &cancelledAnimations, KeyframeEffectReadOnly::TransitionPriority, isStylePropertyHandle);
}
// Properties being animated by animations don't get values from transitions applied.

Powered by Google App Engine
This is Rietveld 408576698