OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CSSShadowListInterpolationType_h | 5 #ifndef CSSVisibilityInterpolationType_h |
6 #define CSSShadowListInterpolationType_h | 6 #define CSSVisibilityInterpolationType_h |
7 | 7 |
8 #include "core/animation/CSSInterpolationType.h" | 8 #include "core/animation/CSSInterpolationType.h" |
| 9 #include "core/style/ComputedStyleConstants.h" |
9 | 10 |
10 namespace blink { | 11 namespace blink { |
11 | 12 |
12 class ShadowList; | 13 class CSSVisibilityInterpolationType : public CSSInterpolationType { |
13 | |
14 class CSSShadowListInterpolationType : public CSSInterpolationType { | |
15 public: | 14 public: |
16 CSSShadowListInterpolationType(CSSPropertyID property) | 15 CSSVisibilityInterpolationType(CSSPropertyID property) |
17 : CSSInterpolationType(property) | 16 : CSSInterpolationType(property) |
18 { } | 17 { |
| 18 ASSERT(property == CSSPropertyVisibility); |
| 19 } |
19 | 20 |
20 PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const Interpolati
onEnvironment&) const final; | 21 PassOwnPtr<InterpolationValue> maybeConvertUnderlyingValue(const Interpolati
onEnvironment&) const final; |
| 22 PassOwnPtr<PairwisePrimitiveInterpolation> mergeSingleConversions(Interpolat
ionValue& startValue, InterpolationValue& endValue) const final; |
21 void composite(UnderlyingValue&, double underlyingFraction, const Interpolat
ionValue&) const final; | 23 void composite(UnderlyingValue&, double underlyingFraction, const Interpolat
ionValue&) const final; |
22 void apply(const InterpolableValue&, const NonInterpolableValue*, Interpolat
ionEnvironment&) const final; | 24 void apply(const InterpolableValue&, const NonInterpolableValue*, Interpolat
ionEnvironment&) const final; |
23 | 25 |
24 private: | 26 private: |
25 PassOwnPtr<InterpolationValue> convertShadowList(const ShadowList*, double z
oom) const; | 27 PassOwnPtr<InterpolationValue> createVisibilityValue(EVisibility) const; |
26 PassOwnPtr<InterpolationValue> createNeutralValue() const; | |
27 | |
28 PassOwnPtr<InterpolationValue> maybeConvertNeutral(const UnderlyingValue&, C
onversionCheckers&) const final; | 28 PassOwnPtr<InterpolationValue> maybeConvertNeutral(const UnderlyingValue&, C
onversionCheckers&) const final; |
29 PassOwnPtr<InterpolationValue> maybeConvertInitial() const final; | 29 PassOwnPtr<InterpolationValue> maybeConvertInitial() const final; |
30 PassOwnPtr<InterpolationValue> maybeConvertInherit(const StyleResolverState&
, ConversionCheckers&) const final; | 30 PassOwnPtr<InterpolationValue> maybeConvertInherit(const StyleResolverState&
, ConversionCheckers&) const final; |
31 PassOwnPtr<InterpolationValue> maybeConvertValue(const CSSValue&, const Styl
eResolverState&, ConversionCheckers&) const final; | 31 PassOwnPtr<InterpolationValue> maybeConvertValue(const CSSValue&, const Styl
eResolverState&, ConversionCheckers&) const final; |
32 PassOwnPtr<PairwisePrimitiveInterpolation> mergeSingleConversions(Interpolat
ionValue& startValue, InterpolationValue& endValue) const final; | 32 |
33 }; | 33 }; |
34 | 34 |
35 } // namespace blink | 35 } // namespace blink |
36 | 36 |
37 #endif // CSSShadowListInterpolationType_h | 37 #endif // CSSVisibilityInterpolationType_h |
OLD | NEW |