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

Unified Diff: Source/core/animation/ElementAnimation.h

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No, really. Created 5 years, 7 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 | « Source/core/animation/EffectModel.idl ('k') | Source/core/animation/ElementAnimation.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ElementAnimation.h
diff --git a/Source/core/animation/ElementAnimation.h b/Source/core/animation/ElementAnimation.h
index eb3a90482b5e37f708758a9d47bc4ac99c1bd677..ee9884e74ad7a283328b779e3be7c7a071d5760e 100644
--- a/Source/core/animation/ElementAnimation.h
+++ b/Source/core/animation/ElementAnimation.h
@@ -32,10 +32,10 @@
#define ElementAnimation_h
#include "bindings/core/v8/UnionTypesCore.h"
-#include "core/animation/Animation.h"
#include "core/animation/AnimationTimeline.h"
#include "core/animation/EffectInput.h"
#include "core/animation/ElementAnimations.h"
+#include "core/animation/KeyframeEffect.h"
#include "core/animation/TimingInput.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
@@ -48,50 +48,50 @@ class Dictionary;
class ElementAnimation {
public:
- static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, double duration, ExceptionState& exceptionState)
+ static Animation* animate(Element& element, const EffectModelOrDictionarySequence& effectInput, double duration, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
+ RefPtrWillBeRawPtr<EffectModel> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
return animateInternal(element, effect, TimingInput::convert(duration));
}
- static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, const AnimationTimingProperties& timingInput, ExceptionState& exceptionState)
+ static Animation* animate(Element& element, const EffectModelOrDictionarySequence& effectInput, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
+ RefPtrWillBeRawPtr<EffectModel> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
return animateInternal(element, effect, TimingInput::convert(timingInput));
}
- static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exceptionState)
+ static Animation* animate(Element& element, const EffectModelOrDictionarySequence& effectInput, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
+ RefPtrWillBeRawPtr<EffectModel> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
return animateInternal(element, effect, Timing());
}
- static WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer>> getAnimationPlayers(Element& element)
+ static WillBeHeapVector<RefPtrWillBeMember<Animation>> getAnimations(Element& element)
{
- WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer>> animationPlayers;
+ WillBeHeapVector<RefPtrWillBeMember<Animation>> animationss;
if (!element.hasAnimations())
- return animationPlayers;
+ return animationss;
- for (const auto& player : element.document().timeline().getAnimationPlayers()) {
- ASSERT(player->source());
- if (toAnimation(player->source())->target() == element && (player->source()->isCurrent() || player->source()->isInEffect()))
- animationPlayers.append(player);
+ for (const auto& animation : element.document().timeline().getAnimations()) {
+ ASSERT(animation->source());
+ if (toKeyframeEffect(animation->source())->target() == element && (animation->source()->isCurrent() || animation->source()->isInEffect()))
+ animationss.append(animation);
}
- return animationPlayers;
+ return animationss;
}
private:
- static AnimationPlayer* animateInternal(Element& element, PassRefPtrWillBeRawPtr<AnimationEffect> effect, const Timing& timing)
+ static Animation* animateInternal(Element& element, PassRefPtrWillBeRawPtr<EffectModel> effect, const Timing& timing)
{
- RefPtrWillBeRawPtr<Animation> animation = Animation::create(&element, effect, timing);
- return element.document().timeline().play(animation.get());
+ RefPtrWillBeRawPtr<KeyframeEffect> keyframeEffect = KeyframeEffect::create(&element, effect, timing);
+ return element.document().timeline().play(keyframeEffect.get());
}
};
« no previous file with comments | « Source/core/animation/EffectModel.idl ('k') | Source/core/animation/ElementAnimation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698