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/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/animation/Interpolation.h" | 10 #include "core/animation/Interpolation.h" |
11 #include "core/animation/PropertyHandle.h" | 11 #include "core/animation/PropertyHandle.h" |
| 12 #include <memory> |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 class StyleResolverState; | 16 class StyleResolverState; |
16 | 17 |
17 enum InterpolationRange { | 18 enum InterpolationRange { |
18 RangeAll, | 19 RangeAll, |
19 RangeFloor, | 20 RangeFloor, |
20 RangeGreaterThanOrEqualToOne, | 21 RangeGreaterThanOrEqualToOne, |
21 RangeNonNegative, | 22 RangeNonNegative, |
(...skipping 18 matching lines...) Expand all Loading... |
40 CSSPropertyID id() const { return m_id; } | 41 CSSPropertyID id() const { return m_id; } |
41 | 42 |
42 PropertyHandle getProperty() const final | 43 PropertyHandle getProperty() const final |
43 { | 44 { |
44 return PropertyHandle(id()); | 45 return PropertyHandle(id()); |
45 } | 46 } |
46 | 47 |
47 protected: | 48 protected: |
48 CSSPropertyID m_id; | 49 CSSPropertyID m_id; |
49 | 50 |
50 StyleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Interpola
bleValue> end, CSSPropertyID id) | 51 StyleInterpolation(std::unique_ptr<InterpolableValue> start, std::unique_ptr
<InterpolableValue> end, CSSPropertyID id) |
51 : Interpolation(std::move(start), std::move(end)) | 52 : Interpolation(std::move(start), std::move(end)) |
52 , m_id(id) | 53 , m_id(id) |
53 { | 54 { |
54 } | 55 } |
55 }; | 56 }; |
56 | 57 |
57 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); | 58 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp
olation(), value.isStyleInterpolation()); |
58 | 59 |
59 } // namespace blink | 60 } // namespace blink |
60 | 61 |
61 #endif | 62 #endif |
OLD | NEW |