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

Side by Side Diff: Source/core/animation/AnimatableValue.h

Issue 19744002: Web Animations: Add CSSAnimatableValueFactory API (partial implementation) (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "core/css/CSSValue.h" 34 #include "core/css/CSSValue.h"
35 #include "wtf/RefCounted.h" 35 #include "wtf/RefCounted.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class CSSValue; 39 class CSSValue;
40 40
41 class AnimatableValue : public RefCounted<AnimatableValue> { 41 class AnimatableValue : public RefCounted<AnimatableValue> {
42 public: 42 public:
43 virtual ~AnimatableValue() { } 43 virtual ~AnimatableValue() { }
44 static PassRefPtr<AnimatableValue> create(CSSValue*);
45 virtual PassRefPtr<CSSValue> toCSSValue() const = 0; 44 virtual PassRefPtr<CSSValue> toCSSValue() const = 0;
46 45
47 static const AnimatableValue* neutralValue(); 46 static const AnimatableValue* neutralValue();
48 virtual bool isNeutral() const { return false; } 47 virtual bool isNeutral() const { return false; }
49 48
50 static PassRefPtr<AnimatableValue> interpolate(const AnimatableValue*, const AnimatableValue*, double fraction); 49 static PassRefPtr<AnimatableValue> interpolate(const AnimatableValue*, const AnimatableValue*, double fraction);
51 // For noncommutative values read add(A, B) to mean the value A with B compo sed onto it. 50 // For noncommutative values read add(A, B) to mean the value A with B compo sed onto it.
52 static PassRefPtr<AnimatableValue> add(const AnimatableValue*, const Animata bleValue*); 51 static PassRefPtr<AnimatableValue> add(const AnimatableValue*, const Animata bleValue*);
53 52
54 protected: 53 protected:
(...skipping 20 matching lines...) Expand all
75 74
76 template <class T> 75 template <class T>
77 static PassRefPtr<T> takeConstRef(const T* value) { return PassRefPtr<T>(con st_cast<T*>(value)); } 76 static PassRefPtr<T> takeConstRef(const T* value) { return PassRefPtr<T>(con st_cast<T*>(value)); }
78 77
79 AnimatableType m_type; 78 AnimatableType m_type;
80 }; 79 };
81 80
82 } // namespace WebCore 81 } // namespace WebCore
83 82
84 #endif // AnimatableValue_h 83 #endif // AnimatableValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698