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

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
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/AnimatableLengthBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableLength.cpp
diff --git a/Source/core/animation/AnimatableLength.cpp b/Source/core/animation/AnimatableLength.cpp
index 13f66f1ebbc27a4624704d5c8a43ecb6cf842d66..f58b14444ad33ddb823629bbdb5fb7775c53510f 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,10 @@ unsigned short AnimatableLength::numberTypeToPrimitiveUnit(NumberUnitType number
return CSSPrimitiveValue::CSS_UNKNOWN;
}
+void AnimatableLength::trace(Visitor* visitor)
+{
+ visitor->trace(m_calcExpression);
+ visitor->trace(m_cachedCSSPrimitiveValue);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/animation/AnimatableLength.h ('k') | Source/core/animation/AnimatableLengthBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698