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

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

Issue 273683005: Web Animations API: Deferred computation of interpolated values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix crashing shadow animation tests Created 6 years, 7 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/InterpolableValuePromise.h
diff --git a/Source/core/animation/InterpolableValuePromise.h b/Source/core/animation/InterpolableValuePromise.h
new file mode 100644
index 0000000000000000000000000000000000000000..84e7235c021fa2fb192b8e37bd8ccb6ab0b9ecc0
--- /dev/null
+++ b/Source/core/animation/InterpolableValuePromise.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef InterpolableValuePromise_h
+#define InterpolableValuePromise_h
+
+#include "CSSPropertyNames.h"
+#include "core/animation/InterpolableValue.h"
+
+namespace WebCore {
+
+class CSSPrimitiveValue;
+class Element;
+class StyleResolverState;
+
+class InterpolableValuePromise : public RefCountedWillBeGarbageCollected<InterpolableValuePromise> {
+ DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(InterpolableValuePromise);
+public:
+ // FIXME: remove element reference
+ static PassRefPtrWillBeRawPtr<InterpolableValuePromise> create(Element& element, CSSPropertyID id, PassRefPtrWillBeRawPtr<CSSValue> value)
+ {
+ return adoptRefWillBeNoop(new InterpolableValuePromise(element, id, value));
+ }
+
+ virtual void trace(Visitor*);
+
+ PassOwnPtrWillBeRawPtr<InterpolableValue> extract(StyleResolverState&, CSSPropertyID);
+ PassRefPtrWillBeRawPtr<AnimatableValue> extractAnimatableValue();
+
+ static bool requiresLateBinding(const CSSValue&);
+ static bool requiresLateBinding(const CSSPrimitiveValue&);
+
+private:
+ InterpolableValuePromise(Element&, CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>);
+
+ RefPtrWillBeMember<CSSValue> m_cssValue;
+ OwnPtrWillBeMember<InterpolableAnimatableValue> m_interpolableAnimatableValue;
+};
+
+}
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698