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

Unified Diff: Source/core/animation/AnimatableLength.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/AnimatableImage.cpp ('k') | Source/core/animation/AnimatableLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableLength.h
diff --git a/Source/core/animation/AnimatableLength.h b/Source/core/animation/AnimatableLength.h
index 387467fc2a830224019fc29c57fc883ab345277e..62b2b133ec09fe28be52267e78adab8bdea07768 100644
--- a/Source/core/animation/AnimatableLength.h
+++ b/Source/core/animation/AnimatableLength.h
@@ -63,21 +63,23 @@ public:
virtual ~AnimatableLength() { }
static bool canCreateFrom(const CSSValue*);
- static PassRefPtr<AnimatableLength> create(CSSValue*);
- static PassRefPtr<AnimatableLength> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
+ static PassRefPtrWillBeRawPtr<AnimatableLength> create(CSSValue*);
+ static PassRefPtrWillBeRawPtr<AnimatableLength> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
{
- return adoptRef(new AnimatableLength(number, unitType, cssPrimitiveValue));
+ return adoptRefWillBeNoop(new AnimatableLength(number, unitType, cssPrimitiveValue));
}
- static PassRefPtr<AnimatableLength> create(PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> calcExpression, CSSPrimitiveValue* cssPrimitiveValue = 0)
+ static PassRefPtrWillBeRawPtr<AnimatableLength> create(PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> calcExpression, CSSPrimitiveValue* cssPrimitiveValue = 0)
{
- return adoptRef(new AnimatableLength(calcExpression, cssPrimitiveValue));
+ return adoptRefWillBeNoop(new AnimatableLength(calcExpression, cssPrimitiveValue));
}
PassRefPtrWillBeRawPtr<CSSValue> toCSSValue(NumberRange = AllValues) const;
Length toLength(const CSSToLengthConversionData&, NumberRange = AllValues) const;
+ virtual void trace(Visitor*) OVERRIDE;
+
protected:
- virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
- virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
+ virtual PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
+ virtual PassRefPtrWillBeRawPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
virtual bool usesDefaultInterpolationWith(const AnimatableValue*) const OVERRIDE;
private:
@@ -108,7 +110,7 @@ private:
return m_unitType == UnitTypeViewportWidth || m_unitType == UnitTypeViewportHeight || m_unitType == UnitTypeViewportMin || m_unitType == UnitTypeViewportMax;
}
- static PassRefPtr<AnimatableLength> create(const AnimatableLength* leftAddend, const AnimatableLength* rightAddend)
+ static PassRefPtrWillBeRawPtr<AnimatableLength> create(const AnimatableLength* leftAddend, const AnimatableLength* rightAddend)
{
ASSERT(leftAddend && rightAddend);
return create(CSSCalcValue::createExpressionNode(leftAddend->toCSSCalcExpressionNode(), rightAddend->toCSSCalcExpressionNode(), CalcAdd));
@@ -117,7 +119,7 @@ private:
PassRefPtrWillBeRawPtr<CSSPrimitiveValue> toCSSPrimitiveValue(NumberRange) const;
PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> toCSSCalcExpressionNode() const;
- PassRefPtr<AnimatableLength> scale(double) const;
+ PassRefPtrWillBeRawPtr<AnimatableLength> scale(double) const;
double clampedNumber(NumberRange range) const
{
ASSERT(!isCalc());
@@ -153,9 +155,9 @@ private:
double m_number;
const NumberUnitType m_unitType;
- RefPtrWillBePersistent<CSSCalcExpressionNode> m_calcExpression;
+ RefPtrWillBeMember<CSSCalcExpressionNode> m_calcExpression;
- mutable RefPtrWillBePersistent<CSSPrimitiveValue> m_cachedCSSPrimitiveValue;
+ mutable RefPtrWillBeMember<CSSPrimitiveValue> m_cachedCSSPrimitiveValue;
friend class AnimationAnimatableLengthTest;
};
« no previous file with comments | « Source/core/animation/AnimatableImage.cpp ('k') | Source/core/animation/AnimatableLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698