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

Unified Diff: Source/core/animation/AnimatableLength.cpp

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
Index: Source/core/animation/AnimatableLength.cpp
diff --git a/Source/core/animation/AnimatableLength.cpp b/Source/core/animation/AnimatableLength.cpp
index 13f66f1ebbc27a4624704d5c8a43ecb6cf842d66..29f8d5acb49ada1dd6f87e33caa1314439749208 100644
--- a/Source/core/animation/AnimatableLength.cpp
+++ b/Source/core/animation/AnimatableLength.cpp
@@ -37,7 +37,7 @@
namespace WebCore {
-PassRefPtr<AnimatableLength> AnimatableLength::create(CSSValue* value)
+PassRefPtrWillBeRawPtr<AnimatableLength> AnimatableLength::create(CSSValue* value)
{
ASSERT(canCreateFrom(value));
if (value->isPrimitiveValue()) {
@@ -97,7 +97,7 @@ bool AnimatableLength::usesDefaultInterpolationWith(const AnimatableValue* value
return type == UnitTypeCalc && (isViewportUnit() || length->isViewportUnit());
}
-PassRefPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValue* value, double fraction) const
+PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValue* value, double fraction) const
{
const AnimatableLength* length = toAnimatableLength(value);
NumberUnitType type = commonUnitType(length);
@@ -111,7 +111,7 @@ PassRefPtr<AnimatableValue> AnimatableLength::interpolateTo(const AnimatableValu
return AnimatableLength::create(scale(1 - fraction).get(), length->scale(fraction).get());
}
-PassRefPtr<AnimatableValue> AnimatableLength::addWith(const AnimatableValue* value) const
+PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableLength::addWith(const AnimatableValue* value) const
{
// Optimization for adding with 0.
if (isUnitlessZero())
@@ -166,7 +166,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> AnimatableLength::toCSSPrimitiveValue(
return m_cachedCSSPrimitiveValue;
}
-PassRefPtr<AnimatableLength> AnimatableLength::scale(double factor) const
+PassRefPtrWillBeRawPtr<AnimatableLength> AnimatableLength::scale(double factor) const
{
if (isCalc()) {
return AnimatableLength::create(CSSCalcValue::createExpressionNode(
@@ -245,4 +245,11 @@ unsigned short AnimatableLength::numberTypeToPrimitiveUnit(NumberUnitType number
return CSSPrimitiveValue::CSS_UNKNOWN;
}
+void AnimatableLength::trace(Visitor* visitor)
+{
+ visitor->trace(m_calcExpression);
+ visitor->trace(m_cachedCSSPrimitiveValue);
+ AnimatableValue::trace(visitor);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698