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

Unified Diff: Source/core/animation/InterpolationType.h

Issue 1215563002: Implement left property animation on InvalidatableStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 6 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/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)

Powered by Google App Engine
This is Rietveld 408576698