Chromium Code Reviews| Index: Source/core/animation/CSSValueAnimationType.h |
| diff --git a/Source/core/animation/CSSValueAnimationType.h b/Source/core/animation/CSSValueAnimationType.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3693d5e0893c674237e6b6e737488753fadfcc40 |
| --- /dev/null |
| +++ b/Source/core/animation/CSSValueAnimationType.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2015 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 CSSValueAnimationType_h |
| +#define CSSValueAnimationType_h |
| + |
| +#include "core/animation/AnimationType.h" |
| + |
| +namespace blink { |
| + |
| +// A catch all animation type for CSSValues that never supports pairwise conversion while always supporting single conversion. |
|
dstockwell
2015/06/23 06:49:46
supports -> support
alancutter (OOO until 2018)
2015/06/23 08:11:04
Rewrote text.
|
| +class CSSValueAnimationType : public AnimationType { |
| +public: |
| + CSSValueAnimationType(CSSPropertyID property) |
| + : AnimationType(property) |
| + { } |
| + |
| + virtual PassOwnPtrWillBeRawPtr<FlipPrimitiveInterpolation::Side> maybeConvertSingle(const CSSPropertySpecificKeyframe&, const StyleResolverState*, ConversionInvalidators&) const override final; |
| + virtual void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const override final; |
| +}; |
| + |
| +class DefaultNonInterpolableValue : public NonInterpolableValue { |
| +public: |
| + virtual ~DefaultNonInterpolableValue() { } |
| + static PassRefPtrWillBeRawPtr<DefaultNonInterpolableValue> create(PassRefPtrWillBeRawPtr<CSSValue> cssValue) |
| + { |
| + return adoptRefWillBeNoop(new DefaultNonInterpolableValue(cssValue)); |
| + } |
| + |
| + CSSValue* cssValue() const { return m_cssValue.get(); } |
| + |
| + DEFINE_INLINE_VIRTUAL_TRACE() |
| + { |
| + NonInterpolableValue::trace(visitor); |
| + visitor->trace(m_cssValue); |
| + } |
| + |
| + DECLARE_NON_INTERPOLABLE_VALUE_TYPE(); |
| + |
| +private: |
| + DefaultNonInterpolableValue(PassRefPtrWillBeRawPtr<CSSValue> cssValue) |
| + : m_cssValue(cssValue) |
| + { } |
| + |
| + RefPtrWillBeMember<CSSValue> m_cssValue; |
| +}; |
| + |
| +DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(DefaultNonInterpolableValue); |
| + |
| +} // namespace blink |
| + |
| +#endif // CSSValueAnimationType_h |