Index: Source/core/animation/PrimitiveInterpolation.h |
diff --git a/Source/core/animation/PrimitiveInterpolation.h b/Source/core/animation/PrimitiveInterpolation.h |
index cad230ecddd1b779fff8e5b26f39984352a236d4..3f87e8460e1a5467e7db3f5fe3e536e0989006d7 100644 |
--- a/Source/core/animation/PrimitiveInterpolation.h |
+++ b/Source/core/animation/PrimitiveInterpolation.h |
@@ -17,13 +17,12 @@ class StyleResolverState; |
// Represents a conversion from a pair of keyframes to something compatible with interpolation. |
// This is agnostic to whether the keyframes are compatible with each other or not. |
-class PrimitiveInterpolation : public NoBaseWillBeGarbageCollectedFinalized<PrimitiveInterpolation> { |
- WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PrimitiveInterpolation); |
+class PrimitiveInterpolation : public GarbageCollectedFinalized<PrimitiveInterpolation> { |
WTF_MAKE_NONCOPYABLE(PrimitiveInterpolation); |
public: |
virtual ~PrimitiveInterpolation() { } |
- virtual void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const = 0; |
+ virtual void interpolateValue(double fraction, Member<InterpolationValue>& result) const = 0; |
virtual double interpolateUnderlyingFraction(double start, double end, double fraction) const = 0; |
virtual bool isFlip() const { return false; } |
@@ -38,12 +37,12 @@ class PairwisePrimitiveInterpolation : public PrimitiveInterpolation { |
public: |
~PairwisePrimitiveInterpolation() override { } |
- static PassOwnPtrWillBeRawPtr<PairwisePrimitiveInterpolation> create(const InterpolationType& type, PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInterpolableValue) |
+ static PairwisePrimitiveInterpolation* create(const InterpolationType& type, InterpolableValue* start, InterpolableValue* end, NonInterpolableValue* nonInterpolableValue) |
{ |
- return adoptPtrWillBeNoop(new PairwisePrimitiveInterpolation(type, start, end, nonInterpolableValue)); |
+ return new PairwisePrimitiveInterpolation(type, start, end, nonInterpolableValue); |
} |
- PassOwnPtrWillBeRawPtr<InterpolationValue> initialValue() const |
+ InterpolationValue* initialValue() const |
{ |
return InterpolationValue::create(m_type, m_start->clone(), m_nonInterpolableValue); |
} |
@@ -57,14 +56,14 @@ public: |
} |
private: |
- PairwisePrimitiveInterpolation(const InterpolationType& type, PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInterpolableValue) |
+ PairwisePrimitiveInterpolation(const InterpolationType& type, InterpolableValue* start, InterpolableValue* end, NonInterpolableValue* nonInterpolableValue) |
: m_type(type) |
, m_start(start) |
, m_end(end) |
, m_nonInterpolableValue(nonInterpolableValue) |
{ } |
- void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const final |
+ void interpolateValue(double fraction, Member<InterpolationValue>& result) const final |
{ |
ASSERT(result); |
ASSERT(&result->type() == &m_type); |
@@ -75,9 +74,9 @@ private: |
double interpolateUnderlyingFraction(double start, double end, double fraction) const final { return blend(start, end, fraction); } |
const InterpolationType& m_type; |
- OwnPtrWillBeMember<InterpolableValue> m_start; |
- OwnPtrWillBeMember<InterpolableValue> m_end; |
- RefPtrWillBeMember<NonInterpolableValue> m_nonInterpolableValue; |
+ Member<InterpolableValue> m_start; |
+ Member<InterpolableValue> m_end; |
+ Member<NonInterpolableValue> m_nonInterpolableValue; |
}; |
// Represents a pair of incompatible keyframes that fall back to 50% flip behaviour eg. "auto" and "0px". |
@@ -85,9 +84,9 @@ class FlipPrimitiveInterpolation : public PrimitiveInterpolation { |
public: |
~FlipPrimitiveInterpolation() override { } |
- static PassOwnPtrWillBeRawPtr<FlipPrimitiveInterpolation> create(PassOwnPtrWillBeRawPtr<InterpolationValue> start, PassOwnPtrWillBeRawPtr<InterpolationValue> end) |
+ static FlipPrimitiveInterpolation* create(InterpolationValue* start, InterpolationValue* end) |
{ |
- return adoptPtrWillBeNoop(new FlipPrimitiveInterpolation(start, end)); |
+ return new FlipPrimitiveInterpolation(start, end); |
} |
DEFINE_INLINE_VIRTUAL_TRACE() |
@@ -98,13 +97,13 @@ public: |
} |
private: |
- FlipPrimitiveInterpolation(PassOwnPtrWillBeRawPtr<InterpolationValue> start, PassOwnPtrWillBeRawPtr<InterpolationValue> end) |
+ FlipPrimitiveInterpolation(InterpolationValue* start, InterpolationValue* end) |
: m_start(start) |
, m_end(end) |
, m_lastFraction(std::numeric_limits<double>::quiet_NaN()) |
{ } |
- void interpolateValue(double fraction, OwnPtrWillBeMember<InterpolationValue>& result) const final |
+ void interpolateValue(double fraction, Member<InterpolationValue>& result) const final |
{ |
// TODO(alancutter): Remove this optimisation once Oilpan is default. |
if (!std::isnan(m_lastFraction) && (fraction < 0.5) == (m_lastFraction < 0.5)) |
@@ -118,8 +117,8 @@ private: |
bool isFlip() const final { return true; } |
- OwnPtrWillBeMember<InterpolationValue> m_start; |
- OwnPtrWillBeMember<InterpolationValue> m_end; |
+ Member<InterpolationValue> m_start; |
+ Member<InterpolationValue> m_end; |
mutable double m_lastFraction; |
}; |