| 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 CSSImageInterpolationType_h | 5 #ifndef CSSImageInterpolationType_h |
| 6 #define CSSImageInterpolationType_h | 6 #define CSSImageInterpolationType_h |
| 7 | 7 |
| 8 #include "core/animation/CSSInterpolationType.h" | 8 #include "core/animation/CSSInterpolationType.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class StyleImage; | 12 class StyleImage; |
| 13 | 13 |
| 14 class CSSImageInterpolationType : public CSSInterpolationType { | 14 class CSSImageInterpolationType : public CSSInterpolationType { |
| 15 public: | 15 public: |
| 16 CSSImageInterpolationType(PropertyHandle property) | 16 CSSImageInterpolationType(PropertyHandle property) |
| 17 : CSSInterpolationType(property) {} | 17 : CSSInterpolationType(property) {} |
| 18 | 18 |
| 19 InterpolationValue maybeConvertUnderlyingValue( | 19 InterpolationValue maybeConvertUnderlyingValue( |
| 20 const InterpolationEnvironment&) const final; | 20 const InterpolationEnvironment&) const final; |
| 21 void composite(UnderlyingValueOwner&, | 21 void composite(UnderlyingValueOwner&, |
| 22 double underlyingFraction, | 22 double underlyingFraction, |
| 23 const InterpolationValue&, | 23 const InterpolationValue&, |
| 24 double interpolationFraction) const final; | 24 double interpolationFraction) const final; |
| 25 void apply(const InterpolableValue&, | 25 void applyStandardPropertyValue(const InterpolableValue&, |
| 26 const NonInterpolableValue*, | 26 const NonInterpolableValue*, |
| 27 InterpolationEnvironment&) const final; | 27 StyleResolverState&) const final; |
| 28 | 28 |
| 29 static InterpolationValue maybeConvertCSSValue(const CSSValue&, | 29 static InterpolationValue maybeConvertCSSValue(const CSSValue&, |
| 30 bool acceptGradients); | 30 bool acceptGradients); |
| 31 static InterpolationValue maybeConvertStyleImage(const StyleImage&, | 31 static InterpolationValue maybeConvertStyleImage(const StyleImage&, |
| 32 bool acceptGradients); | 32 bool acceptGradients); |
| 33 static InterpolationValue maybeConvertStyleImage(const StyleImage* image, | 33 static InterpolationValue maybeConvertStyleImage(const StyleImage* image, |
| 34 bool acceptGradients) { | 34 bool acceptGradients) { |
| 35 return image ? maybeConvertStyleImage(*image, acceptGradients) : nullptr; | 35 return image ? maybeConvertStyleImage(*image, acceptGradients) : nullptr; |
| 36 } | 36 } |
| 37 static PairwiseInterpolationValue staticMergeSingleConversions( | 37 static PairwiseInterpolationValue staticMergeSingleConversions( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 60 PairwiseInterpolationValue maybeMergeSingles( | 60 PairwiseInterpolationValue maybeMergeSingles( |
| 61 InterpolationValue&& start, | 61 InterpolationValue&& start, |
| 62 InterpolationValue&& end) const final { | 62 InterpolationValue&& end) const final { |
| 63 return staticMergeSingleConversions(std::move(start), std::move(end)); | 63 return staticMergeSingleConversions(std::move(start), std::move(end)); |
| 64 } | 64 } |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace blink | 67 } // namespace blink |
| 68 | 68 |
| 69 #endif // CSSImageInterpolationType_h | 69 #endif // CSSImageInterpolationType_h |
| OLD | NEW |