Chromium Code Reviews| Index: Source/core/animation/InterpolationType.h |
| diff --git a/Source/core/animation/InterpolationType.h b/Source/core/animation/InterpolationType.h |
| index b32232d5f5d09eeec32fa15a382579b7021a4e96..906ef9f9bb95768b39d4bbfcf60b742789c0c8b2 100644 |
| --- a/Source/core/animation/InterpolationType.h |
| +++ b/Source/core/animation/InterpolationType.h |
| @@ -39,7 +39,11 @@ public: |
| 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()); |
| + return PairwisePrimitiveInterpolation::create( |
| + *this, |
| + startValue->m_interpolableValue.release(), |
| + endValue->m_interpolableValue.release(), |
| + mergeNonInterpolableValues(startValue->nonInterpolableValue(), endValue->nonInterpolableValue())); |
| } |
| virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertSingle(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const |
| @@ -56,9 +60,15 @@ public: |
| virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertUnderlyingValue(const StyleResolverState&) const = 0; |
| + virtual PassRefPtrWillBeRawPtr<NonInterpolableValue> mergeNonInterpolableValues(const NonInterpolableValue* a, const NonInterpolableValue* b) const |
|
dstockwell
2015/08/31 06:44:26
comment, what does it mean to merge these?
alancutter (OOO until 2018)
2015/09/01 00:26:00
Added comment. Changed default implementation to a
|
| + { |
| + // Remove const for ref counting. |
| + return const_cast<NonInterpolableValue*>(b); |
| + } |
| + |
| virtual void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const = 0; |
| - // Implement reference equality checking via pointer equality checking as these are singletons |
| + // Implement reference equality checking via pointer equality checking as these are singletons. |
| bool operator==(const InterpolationType& other) const { return this == &other; } |
| bool operator!=(const InterpolationType& other) const { return this != &other; } |