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

Unified Diff: third_party/WebKit/Source/core/animation/StyleInterpolation.h

Issue 2236193002: WIP: Implement CSS transitions on top of InterpolationTypes instead of AnimatableValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_environmentStyle
Patch Set: Created 4 years, 4 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: third_party/WebKit/Source/core/animation/StyleInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/StyleInterpolation.h b/third_party/WebKit/Source/core/animation/StyleInterpolation.h
index 3317039d022538c1000a41316a09a274877f06dd..03db5f69f23cf77b37c0e39dbc5acbffbf676cfc 100644
--- a/third_party/WebKit/Source/core/animation/StyleInterpolation.h
+++ b/third_party/WebKit/Source/core/animation/StyleInterpolation.h
@@ -15,17 +15,6 @@ namespace blink {
class StyleResolverState;
-enum InterpolationRange {
- RangeAll,
- RangeFloor,
- RangeGreaterThanOrEqualToOne,
- RangeNonNegative,
- RangeRound,
- RangeRoundGreaterThanOrEqualToOne,
- RangeOpacityFIXME,
- RangeZeroToOne
-};
-
class CORE_EXPORT StyleInterpolation : public Interpolation {
public:
// 1) convert m_cachedValue into an X
@@ -46,13 +35,21 @@ public:
}
protected:
- CSSPropertyID m_id;
+ StyleInterpolation(std::unique_ptr<InterpolableValue> start, std::unique_ptr<InterpolableValue> end, CSSPropertyID);
- StyleInterpolation(std::unique_ptr<InterpolableValue> start, std::unique_ptr<InterpolableValue> end, CSSPropertyID id)
- : Interpolation(std::move(start), std::move(end))
- , m_id(id)
- {
- }
+ void interpolateImpl() final;
+
+ const std::unique_ptr<InterpolableValue> m_start;
+ const std::unique_ptr<InterpolableValue> m_end;
+ const CSSPropertyID m_id;
+
+ mutable std::unique_ptr<InterpolableValue> m_cachedValue;
+
+private:
+ InterpolableValue* getCachedValueForTesting() const { return m_cachedValue.get(); }
+
+ friend class AnimationInterpolableValueTest;
+ friend class AnimationInterpolationEffectTest;
};
DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterpolation(), value.isStyleInterpolation());

Powered by Google App Engine
This is Rietveld 408576698