| 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 LengthStyleInterpolation_h | 5 #ifndef LengthStyleInterpolation_h |
| 6 #define LengthStyleInterpolation_h | 6 #define LengthStyleInterpolation_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/StyleInterpolation.h" | 9 #include "core/animation/StyleInterpolation.h" |
| 10 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 static PassRefPtr<LengthStyleInterpolation> create(const CSSValue& start, co
nst CSSValue& end, CSSPropertyID id, InterpolationRange range) | 21 static PassRefPtr<LengthStyleInterpolation> create(const CSSValue& start, co
nst CSSValue& end, CSSPropertyID id, InterpolationRange range) |
| 22 { | 22 { |
| 23 return adoptRef(new LengthStyleInterpolation(toInterpolableValue(start,
id), toInterpolableValue(end, id), id, range)); | 23 return adoptRef(new LengthStyleInterpolation(toInterpolableValue(start,
id), toInterpolableValue(end, id), id, range)); |
| 24 } | 24 } |
| 25 | 25 |
| 26 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali
d); | 26 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali
d); |
| 27 | 27 |
| 28 void apply(StyleResolverState&) const override; | 28 void apply(StyleResolverState&) const override; |
| 29 | 29 |
| 30 static PassOwnPtr<InterpolableValue> toInterpolableValue(const CSSValue&, CS
SPropertyID = CSSPropertyInvalid); | 30 static PassOwnPtr<InterpolableValue> toInterpolableValue(const CSSValue&, CS
SPropertyID = CSSPropertyInvalid); |
| 31 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const
InterpolableValue&, InterpolationRange); | 31 static RawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableVal
ue&, InterpolationRange); |
| 32 static void applyInterpolableValue(CSSPropertyID, const InterpolableValue&,
InterpolationRange, StyleResolverState&); | 32 static void applyInterpolableValue(CSSPropertyID, const InterpolableValue&,
InterpolationRange, StyleResolverState&); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 LengthStyleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Int
erpolableValue> end, CSSPropertyID id, InterpolationRange range) | 35 LengthStyleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Int
erpolableValue> end, CSSPropertyID id, InterpolationRange range) |
| 36 : StyleInterpolation(std::move(start), std::move(end), id) | 36 : StyleInterpolation(std::move(start), std::move(end), id) |
| 37 , m_range(range) | 37 , m_range(range) |
| 38 { | 38 { |
| 39 } | 39 } |
| 40 | 40 |
| 41 InterpolationRange m_range; | 41 InterpolationRange m_range; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif | 46 #endif |
| OLD | NEW |