Index: Source/core/animation/InterpolationType.h |
diff --git a/Source/core/animation/InterpolationType.h b/Source/core/animation/InterpolationType.h |
index 1962d8dbce584061fb83655190c75de9044b25cb..a1c98a14633faec390467db0db4e80961e39c8c5 100644 |
--- a/Source/core/animation/InterpolationType.h |
+++ b/Source/core/animation/InterpolationType.h |
@@ -31,15 +31,26 @@ public: |
}; |
using ConversionCheckers = WillBeHeapVector<OwnPtrWillBeMember<ConversionChecker>>; |
- virtual PassOwnPtrWillBeRawPtr<PairwisePrimitiveInterpolation> maybeConvertPairwise(const CSSPropertySpecificKeyframe& startKeyframe, const CSSPropertySpecificKeyframe& endKeyframe, const StyleResolverState*, ConversionCheckers&) const |
+ virtual PassOwnPtrWillBeRawPtr<PairwisePrimitiveInterpolation> maybeConvertPairwise(const CSSPropertySpecificKeyframe& startKeyframe, const CSSPropertySpecificKeyframe& endKeyframe, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const |
{ |
- return nullptr; |
+ OwnPtrWillBeRawPtr<InterpolationValue> startValue = maybeConvertSingle(startKeyframe, state, conversionCheckers); |
+ if (!startValue) |
+ return nullptr; |
+ OwnPtrWillBeRawPtr<InterpolationValue> endValue = maybeConvertSingle(endKeyframe, state, conversionCheckers); |
+ if (!endValue) |
+ return nullptr; |
+ return PairwisePrimitiveInterpolation::create(*this, startValue->m_interpolableValue.release(), endValue->m_interpolableValue.release(), startValue->m_nonInterpolableValue.release()); |
} |
virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertSingle(const CSSPropertySpecificKeyframe&, const StyleResolverState*, ConversionCheckers&) const = 0; |
+ virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertUnderlyingValue(const StyleResolverState&) const = 0; |
+ |
virtual void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const = 0; |
+ bool operator==(const InterpolationType& other) const { return this == &other; } |
+ bool operator!=(const InterpolationType& other) const { return this != &other; } |
shans
2015/07/02 12:02:47
A comment on these would be useful. At first glanc
alancutter (OOO until 2018)
2015/07/03 01:38:22
Done.
|
+ |
protected: |
InterpolationType(CSSPropertyID property) |
: m_property(property) |