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

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

Issue 216603008: Revert "Web Animations: Introduce String based KeyframeEffectModel" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/Interpolation.cpp ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Keyframe.h
diff --git a/Source/core/animation/Keyframe.h b/Source/core/animation/Keyframe.h
deleted file mode 100644
index d4820a4f84136dbe3109f39886b1a1ec840cbb90..0000000000000000000000000000000000000000
--- a/Source/core/animation/Keyframe.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef Keyframe_h
-#define Keyframe_h
-
-#include "CSSPropertyNames.h"
-#include "core/animation/AnimationEffect.h"
-#include "core/animation/TimedItem.h"
-
-namespace WebCore {
-
-typedef HashSet<CSSPropertyID> PropertySet;
-
-// FIXME: Make Keyframe immutable
-class Keyframe : public RefCountedWillBeGarbageCollectedFinalized<Keyframe> {
-public:
- virtual ~Keyframe() { }
-
- void setOffset(double offset) { m_offset = offset; }
- double offset() const { return m_offset; }
-
- void setComposite(AnimationEffect::CompositeOperation composite) { m_composite = composite; }
- AnimationEffect::CompositeOperation composite() const { return m_composite; }
-
- void setEasing(PassRefPtr<TimingFunction> easing) { m_easing = easing; }
- TimingFunction* easing() const { return m_easing.get(); }
-
- static bool compareOffsets(const RefPtrWillBeRawPtr<Keyframe>&, const RefPtrWillBeRawPtr<Keyframe>&);
- virtual PropertySet properties() const = 0;
-
- virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const = 0;
- PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const
- {
- RefPtrWillBeRawPtr<Keyframe> theClone = clone();
- theClone->setOffset(offset);
- return theClone.release();
- }
-
- virtual bool isAnimatableValueKeyframe() const { return false; }
- virtual bool isStringKeyframe() const { return false; }
-
- void trace(Visitor*) { }
-
- class PropertySpecificKeyframe : public NoBaseWillBeGarbageCollectedFinalized<PropertySpecificKeyframe> {
- public:
- virtual ~PropertySpecificKeyframe() { }
- double offset() const { return m_offset; }
- TimingFunction* easing() const { return m_easing.get(); }
- AnimationEffect::CompositeOperation composite() const { return m_composite; }
- virtual PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) const = 0;
-
- virtual bool isAnimatableValuePropertySpecificKeyframe() const { return false; }
- virtual bool isStringPropertySpecificKeyframe() const { return false; }
-
- virtual PassOwnPtr<PropertySpecificKeyframe> neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const = 0;
- virtual PassRefPtr<Interpolation> createInterpolation(CSSPropertyID, WebCore::Keyframe::PropertySpecificKeyframe* end) const = 0;
-
- protected:
- PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, AnimationEffect::CompositeOperation);
-
- double m_offset;
- RefPtr<TimingFunction> m_easing;
- AnimationEffect::CompositeOperation m_composite;
- };
-
- virtual PassOwnPtr<PropertySpecificKeyframe> createPropertySpecificKeyframe(CSSPropertyID) const = 0;
-
-
-protected:
- Keyframe()
- : m_offset(nullValue())
- , m_composite(AnimationEffect::CompositeReplace)
- , m_easing(LinearTimingFunction::preset())
- {
- }
- Keyframe(double offset, AnimationEffect::CompositeOperation composite, PassRefPtr<TimingFunction> easing)
- : m_offset(offset)
- , m_composite(composite)
- , m_easing(easing)
- {
- }
-
- double m_offset;
- AnimationEffect::CompositeOperation m_composite;
- RefPtr<TimingFunction> m_easing;
-};
-
-typedef Keyframe::PropertySpecificKeyframe PropertySpecificKeyframe;
-
-}
-
-#endif
« no previous file with comments | « Source/core/animation/Interpolation.cpp ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698