Chromium Code Reviews| Index: Source/core/animation/DefaultAnimationType.h |
| diff --git a/Source/core/animation/DefaultAnimationType.h b/Source/core/animation/DefaultAnimationType.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8163708c46cca1d9318ba461ee9a33d05c418bd9 |
| --- /dev/null |
| +++ b/Source/core/animation/DefaultAnimationType.h |
| @@ -0,0 +1,59 @@ |
| +// 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 DefaultAnimationType_h |
| +#define DefaultAnimationType_h |
| + |
| +#include "core/animation/AnimationType.h" |
| + |
| +namespace blink { |
| + |
| +class DefaultAnimationType : public AnimationType { |
| +public: |
| + DefaultAnimationType(CSSPropertyID property) |
| + : m_property(property) |
|
Eric Willigers
2015/05/27 04:26:35
Can be indented. Same in DefaultNonInterpolableVal
alancutter (OOO until 2018)
2015/05/27 08:27:48
Done.
|
| + { } |
| + |
| + virtual CSSPropertyID property() const { return m_property; } |
| + |
| + virtual bool maybeConvertSingle( |
| + const CSSPropertySpecificKeyframe&, |
| + const StyleResolverState*, |
| + RefPtrWillBeRawPtr<InterpolationIsInvalid>& resultIsInvalid, |
| + OwnPtrWillBeRawPtr<InterpolableValue>& resultInterpolableValue, |
| + RefPtrWillBeRawPtr<NonInterpolableValue>& resultNonInterpolableValue) const; |
| + |
| + virtual void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const; |
| +private: |
| + CSSPropertyID m_property; |
|
Eric Willigers
2015/05/27 04:26:35
Can be const.
alancutter (OOO until 2018)
2015/05/27 08:27:48
Done.
|
| +}; |
| + |
| +class DefaultNonInterpolableValue : public NonInterpolableValue { |
| +public: |
| + 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 // DefaultAnimationType_h |