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

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

Issue 19367002: Implement DeferredAnimatableValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 5 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 | « no previous file | Source/core/animation/AnimatableValue.h » ('j') | Source/core/animation/AnimatableValue.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableDeferredSnapshot.h
diff --git a/Source/core/animation/AnimatableNeutral.h b/Source/core/animation/AnimatableDeferredSnapshot.h
similarity index 73%
copy from Source/core/animation/AnimatableNeutral.h
copy to Source/core/animation/AnimatableDeferredSnapshot.h
index e044ee825e7514a99776bcc03ea68c207ae9eb47..da7caabe3e2eb8c19b46482d85118e0a02b0ff25 100644
--- a/Source/core/animation/AnimatableNeutral.h
+++ b/Source/core/animation/AnimatableDeferredSnapshot.h
@@ -28,16 +28,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AnimatableNeutral_h
-#define AnimatableNeutral_h
+#ifndef AnimatableDeferredSnapshot_h
+#define AnimatableDeferredSnapshot_h
#include "core/animation/AnimatableValue.h"
namespace WebCore {
-class AnimatableNeutral : public AnimatableValue {
+// Used as a sentinal value to indicate where a snapshot of an element's CSS value should go in a KeyframeAnimationEffect::KeyframeVector.
+class AnimatableDeferredSnapshot : public AnimatableValue {
public:
- virtual ~AnimatableNeutral() { }
+ virtual ~AnimatableDeferredSnapshot() { }
virtual PassRefPtr<CSSValue> toCSSValue() const OVERRIDE
{
@@ -45,25 +46,30 @@ public:
return 0;
}
- virtual bool isNeutral() const OVERRIDE { return true; }
+ virtual bool isDeferredSnapshot() const OVERRIDE { return true; }
protected:
- static PassRefPtr<AnimatableNeutral> create() { return adoptRef(new AnimatableNeutral()); }
+ static PassRefPtr<AnimatableDeferredSnapshot> create() { return adoptRef(new AnimatableDeferredSnapshot()); }
- virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue* value, double fraction) const OVERRIDE
+ virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE
{
ASSERT_NOT_REACHED();
return 0;
}
- virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue* value) const OVERRIDE { return defaultAddWith(this, value); }
+ virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE
+ {
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
private:
- AnimatableNeutral() : AnimatableValue(TypeNeutral) { }
+ AnimatableDeferredSnapshot() : AnimatableValue(TypeDeferredSnapshot) { }
friend class AnimatableValue;
};
+
} // namespace WebCore
-#endif // AnimatableNeutral_h
+#endif // AnimatableDeferredSnapshot_h
« no previous file with comments | « no previous file | Source/core/animation/AnimatableValue.h » ('j') | Source/core/animation/AnimatableValue.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698