| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 StyleInterpolation_h | 5 #ifndef StyleInterpolation_h |
| 6 #define StyleInterpolation_h | 6 #define StyleInterpolation_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/animation/Interpolation.h" | 9 #include "core/animation/Interpolation.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class StyleResolverState; | 13 class StyleResolverState; |
| 14 | 14 |
| 15 enum InterpolationRange { | 15 enum InterpolationRange { |
| 16 RangeNonNegative, | 16 RangeNonNegative, |
| 17 RangeOpacityFIXME, | 17 RangeFractions, |
| 18 RangeFloor, |
| 19 RangeGreaterThanZero, |
| 20 RangeRound, |
| 21 RangeGreaterThanOne, |
| 22 RangeAbsoluteValueFloor, |
| 18 RangeAll | 23 RangeAll |
| 19 }; | 24 }; |
| 20 | 25 |
| 21 class StyleInterpolation : public Interpolation { | 26 class StyleInterpolation : public Interpolation { |
| 22 public: | 27 public: |
| 23 // 1) convert m_cachedValue into an X | 28 // 1) convert m_cachedValue into an X |
| 24 // 2) shove X into StyleResolverState | 29 // 2) shove X into StyleResolverState |
| 25 // X can be: | 30 // X can be: |
| 26 // (1) a CSSValue (and applied via StyleBuilder::applyProperty) | 31 // (1) a CSSValue (and applied via StyleBuilder::applyProperty) |
| 27 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro
perty) | 32 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro
perty) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 , m_id(id) | 50 , m_id(id) |
| 46 { | 51 { |
| 47 } | 52 } |
| 48 }; | 53 }; |
| 49 | 54 |
| 50 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); | 55 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); |
| 51 | 56 |
| 52 } | 57 } |
| 53 | 58 |
| 54 #endif | 59 #endif |
| OLD | NEW |