Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / animation / LengthPairStyleInterpolation.h
blobbfa3271b5ee90ca0897ceafeb9cc317668422317
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
3 // found in the LICENSE file.
5 #ifndef LengthPairStyleInterpolation_h
6 #define LengthPairStyleInterpolation_h
8 #include "core/CoreExport.h"
9 #include "core/animation/StyleInterpolation.h"
10 #include "platform/Length.h"
12 namespace blink {
14 class CORE_EXPORT LengthPairStyleInterpolation : public StyleInterpolation {
15 public:
16 static PassRefPtr<LengthPairStyleInterpolation> create(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range)
18 return adoptRef(new LengthPairStyleInterpolation(lengthPairToInterpolableValue(start), lengthPairToInterpolableValue(end), id, range));
21 static bool canCreateFrom(const CSSValue&);
23 void apply(StyleResolverState&) const override;
25 private:
26 LengthPairStyleInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRange range)
27 : StyleInterpolation(start, end, id), m_range(range)
31 static PassOwnPtr<InterpolableValue> lengthPairToInterpolableValue(const CSSValue&);
32 static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToLengthPair(InterpolableValue*, InterpolationRange);
34 InterpolationRange m_range;
36 friend class LengthPairStyleInterpolationTest;
39 } // namespace blink
41 #endif // LengthPairStyleInterpolation_h