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

Unified Diff: Source/core/animation/KeyframeEffect.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/Keyframe.h ('k') | Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffect.h
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/KeyframeEffect.h
similarity index 68%
copy from Source/core/animation/Animation.h
copy to Source/core/animation/KeyframeEffect.h
index 3f8937196673096f8227cd98ddb856eafc8197c5..33dafa7b574b83a0882a6e525c4db94e79b6f6e4 100644
--- a/Source/core/animation/Animation.h
+++ b/Source/core/animation/KeyframeEffect.h
@@ -28,45 +28,45 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Animation_h
-#define Animation_h
+#ifndef KeyframeEffect_h
+#define KeyframeEffect_h
#include "core/CoreExport.h"
#include "core/animation/AnimationEffect.h"
-#include "core/animation/AnimationNode.h"
#include "core/animation/EffectInput.h"
+#include "core/animation/EffectModel.h"
#include "core/animation/TimingInput.h"
#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
namespace blink {
-class AnimationTimingProperties;
+class KeyframeEffectOptions;
class Dictionary;
class Element;
class ExceptionState;
class PropertyHandle;
class SampledEffect;
-class CORE_EXPORT Animation final : public AnimationNode {
+class CORE_EXPORT KeyframeEffect final : public AnimationEffect {
DEFINE_WRAPPERTYPEINFO();
public:
enum Priority { DefaultPriority, TransitionPriority };
- static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtrWillBeRawPtr<EventDelegate> = nullptr);
+ static PassRefPtrWillBeRawPtr<KeyframeEffect> create(Element*, PassRefPtrWillBeRawPtr<EffectModel>, const Timing&, Priority = DefaultPriority, PassOwnPtrWillBeRawPtr<EventDelegate> = nullptr);
// Web Animations API Bindings constructors.
- static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState&);
- static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, const AnimationTimingProperties& timingInput, ExceptionState&);
- static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<KeyframeEffect> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<KeyframeEffect> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, const KeyframeEffectOptions& timingInput, ExceptionState&);
+ static PassRefPtrWillBeRawPtr<KeyframeEffect> create(Element*, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState&);
- virtual ~Animation();
+ virtual ~KeyframeEffect();
virtual bool isAnimation() const override { return true; }
bool affects(PropertyHandle) const;
- const AnimationEffect* effect() const { return m_effect.get(); }
- AnimationEffect* effect() { return m_effect.get(); }
- void setEffect(PassRefPtrWillBeRawPtr<AnimationEffect> effect) { m_effect = effect; }
+ const EffectModel* effect() const { return m_effect.get(); }
+ EffectModel* effect() { return m_effect.get(); }
+ void setEffect(PassRefPtrWillBeRawPtr<EffectModel> effect) { m_effect = effect; }
Priority priority() const { return m_priority; }
Element* target() const { return m_target; }
@@ -74,9 +74,9 @@ public:
void notifyElementDestroyed();
#endif
- bool isCandidateForAnimationOnCompositor(double playerPlaybackRate) const;
+ bool isCandidateForAnimationOnCompositor(double animationPlaybackRate) const;
// Must only be called once.
- bool maybeStartAnimationOnCompositor(int group, double startTime, double timeOffset, double playerPlaybackRate);
+ bool maybeStartAnimationOnCompositor(int group, double startTime, double timeOffset, double animationPlaybackRate);
bool hasActiveAnimationsOnCompositor() const;
bool hasActiveAnimationsOnCompositor(CSSPropertyID) const;
bool cancelAnimationOnCompositor();
@@ -91,22 +91,22 @@ public:
DECLARE_VIRTUAL_TRACE();
- void downgradeToNormalAnimation() { m_priority = DefaultPriority; }
+ void downgradeToNormal() { m_priority = DefaultPriority; }
protected:
void applyEffects();
void clearEffects();
virtual void updateChildrenAndEffects() const override;
- virtual void attach(AnimationPlayer*) override;
+ virtual void attach(Animation*) override;
virtual void detach() override;
virtual void specifiedTimingChanged() override;
virtual double calculateTimeToEffectChange(bool forwards, double inheritedTime, double timeToNextIteration) const override;
private:
- Animation(Element*, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority, PassOwnPtrWillBeRawPtr<EventDelegate>);
+ KeyframeEffect(Element*, PassRefPtrWillBeRawPtr<EffectModel>, const Timing&, Priority, PassOwnPtrWillBeRawPtr<EventDelegate>);
RawPtrWillBeMember<Element> m_target;
- RefPtrWillBeMember<AnimationEffect> m_effect;
+ RefPtrWillBeMember<EffectModel> m_effect;
RawPtrWillBeMember<SampledEffect> m_sampledEffect;
Priority m_priority;
@@ -116,8 +116,8 @@ private:
friend class AnimationAnimationV8Test;
};
-DEFINE_TYPE_CASTS(Animation, AnimationNode, animationNode, animationNode->isAnimation(), animationNode.isAnimation());
+DEFINE_TYPE_CASTS(KeyframeEffect, AnimationEffect, animationNode, animationNode->isAnimation(), animationNode.isAnimation());
} // namespace blink
-#endif // Animation_h
+#endif // KeyframeEffect_h
« no previous file with comments | « Source/core/animation/Keyframe.h ('k') | Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698