Chromium Code Reviews| 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 LengthPairStyleInterpolation_h | 5 #ifndef LengthPairStyleInterpolation_h |
| 6 #define LengthPairStyleInterpolation_h | 6 #define LengthPairStyleInterpolation_h |
| 7 | 7 |
| 8 #include "core/animation/StyleInterpolation.h" | 8 #include "core/animation/StyleInterpolation.h" |
| 9 #include "platform/Length.h" | 9 #include "platform/Length.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class LengthPairStyleInterpolation : public StyleInterpolation { | 13 class LengthPairStyleInterpolation : public StyleInterpolation { |
| 14 public: | 14 public: |
| 15 | |
|
samli
2014/12/22 03:38:04
remove new line
| |
| 15 static PassRefPtrWillBeRawPtr<LengthPairStyleInterpolation> create(const CSS Value& start, const CSSValue& end, CSSPropertyID id, ValueRange range) | 16 static PassRefPtrWillBeRawPtr<LengthPairStyleInterpolation> create(const CSS Value& start, const CSSValue& end, CSSPropertyID id, ValueRange range) |
| 16 { | 17 { |
| 17 return adoptRefWillBeNoop(new LengthPairStyleInterpolation(lengthPairToI nterpolableValue(start), lengthPairToInterpolableValue(end), id, range)); | 18 return adoptRefWillBeNoop(new LengthPairStyleInterpolation(lengthPairToI nterpolableValue(start), lengthPairToInterpolableValue(end), id, range)); |
| 18 } | 19 } |
| 19 | 20 |
| 20 static bool canCreateFrom(const CSSValue&); | 21 static bool canCreateFrom(const CSSValue&); |
| 21 | 22 |
| 22 virtual void apply(StyleResolverState&) const override; | 23 virtual void apply(StyleResolverState&) const override; |
| 24 virtual void trace(Visitor*) override; | |
| 25 | |
| 23 | 26 |
| 24 private: | 27 private: |
| 25 LengthPairStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start , PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, ValueRange ra nge) | 28 LengthPairStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start , PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, ValueRange ra nge) |
| 26 : StyleInterpolation(start, end, id), m_range(range) | 29 : StyleInterpolation(start, end, id), m_range(range) |
| 27 { | 30 { |
| 28 } | 31 } |
| 29 | 32 |
| 30 static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthPairToInterpolableVal ue(const CSSValue&); | 33 static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthPairToInterpolableVal ue(const CSSValue&); |
| 31 static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthPair(Interp olableValue*, ValueRange); | 34 static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthPair(Interp olableValue*, ValueRange); |
| 32 | 35 |
| 33 ValueRange m_range; | 36 ValueRange m_range; |
| 34 | 37 |
| 35 friend class LengthPairStyleInterpolationTest; | 38 friend class LengthPairStyleInterpolationTest; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 } // namespace blink | 41 } // namespace blink |
| 39 | 42 |
| 40 #endif // LengthPairStyleInterpolation_h | 43 #endif // LengthPairStyleInterpolation_h |
| OLD | NEW |