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

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

Issue 204743002: Oilpan: Move AnimatableValue's hierarchy to oilpan's heap (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/AnimatableUnknownTest.cpp ('k') | Source/core/animation/AnimatableValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableValue.h
diff --git a/Source/core/animation/AnimatableValue.h b/Source/core/animation/AnimatableValue.h
index 58ce56e3cf02a7d787e17f18b3c832655c501856..47046a2958fc38c250efecb9637a92ed18492920 100644
--- a/Source/core/animation/AnimatableValue.h
+++ b/Source/core/animation/AnimatableValue.h
@@ -32,19 +32,20 @@
#define AnimatableValue_h
#include "core/css/CSSValue.h"
+#include "heap/Handle.h"
#include "wtf/RefCounted.h"
namespace WebCore {
-class AnimatableValue : public RefCounted<AnimatableValue> {
+class AnimatableValue : public RefCountedWillBeGarbageCollectedFinalized<AnimatableValue> {
public:
virtual ~AnimatableValue() { }
static const AnimatableValue* neutralValue();
- static PassRefPtr<AnimatableValue> interpolate(const AnimatableValue*, const AnimatableValue*, double fraction);
+ static PassRefPtrWillBeRawPtr<AnimatableValue> interpolate(const AnimatableValue*, const AnimatableValue*, double fraction);
// For noncommutative values read add(A, B) to mean the value A with B composed onto it.
- static PassRefPtr<AnimatableValue> add(const AnimatableValue*, const AnimatableValue*);
+ static PassRefPtrWillBeRawPtr<AnimatableValue> add(const AnimatableValue*, const AnimatableValue*);
static double distance(const AnimatableValue* from, const AnimatableValue* to);
static bool usesDefaultInterpolation(const AnimatableValue* from, const AnimatableValue* to)
{
@@ -87,6 +88,8 @@ public:
return value->type() == type();
}
+ virtual void trace(Visitor*) = 0;
+
protected:
enum AnimatableType {
TypeClipPathOperation,
@@ -112,17 +115,17 @@ protected:
};
virtual bool usesDefaultInterpolationWith(const AnimatableValue* value) const { return false; }
- virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const = 0;
- static PassRefPtr<AnimatableValue> defaultInterpolateTo(const AnimatableValue* left, const AnimatableValue* right, double fraction) { return takeConstRef((fraction < 0.5) ? left : right); }
+ virtual PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const = 0;
+ static PassRefPtrWillBeRawPtr<AnimatableValue> defaultInterpolateTo(const AnimatableValue* left, const AnimatableValue* right, double fraction) { return takeConstRef((fraction < 0.5) ? left : right); }
// For noncommutative values read A->addWith(B) to mean the value A with B composed onto it.
- virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const;
- static PassRefPtr<AnimatableValue> defaultAddWith(const AnimatableValue* left, const AnimatableValue* right) { return takeConstRef(right); }
+ virtual PassRefPtrWillBeRawPtr<AnimatableValue> addWith(const AnimatableValue*) const;
+ static PassRefPtrWillBeRawPtr<AnimatableValue> defaultAddWith(const AnimatableValue* left, const AnimatableValue* right) { return takeConstRef(right); }
template <class T>
- static PassRefPtr<T> takeConstRef(const T* value) { return PassRefPtr<T>(const_cast<T*>(value)); }
+ static PassRefPtrWillBeRawPtr<T> takeConstRef(const T* value) { return PassRefPtrWillBeRawPtr<T>(const_cast<T*>(value)); }
private:
virtual AnimatableType type() const = 0;
« no previous file with comments | « Source/core/animation/AnimatableUnknownTest.cpp ('k') | Source/core/animation/AnimatableValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698