Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: Source/core/animation/LengthStyleInterpolation.h

Issue 955863002: Support keywords in LengthStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: transitions test with interpolated perspective Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/animation/StyleInterpolation.h" 8 #include "core/animation/StyleInterpolation.h"
9 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
10 #include "platform/Length.h" 10 #include "platform/Length.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LengthStyleInterpolation : public StyleInterpolation { 14 class LengthStyleInterpolation : public StyleInterpolation {
15 public: 15 public:
16 16
17 typedef void NonInterpolableType; 17 typedef void NonInterpolableType;
18 18
19 static PassRefPtrWillBeRawPtr<LengthStyleInterpolation> create(const CSSValu e& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range) 19 static PassRefPtrWillBeRawPtr<LengthStyleInterpolation> create(const CSSValu e& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range)
20 { 20 {
21 return adoptRefWillBeNoop(new LengthStyleInterpolation(toInterpolableVal ue(start), toInterpolableValue(end), id, range)); 21 return adoptRefWillBeNoop(new LengthStyleInterpolation(toInterpolableVal ue(start, id), toInterpolableValue(end, id), id, range));
22 } 22 }
23 23
24 static bool canCreateFrom(const CSSValue&); 24 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali d);
25 25
26 virtual void apply(StyleResolverState&) const override; 26 virtual void apply(StyleResolverState&) const override;
27 27
28 DECLARE_VIRTUAL_TRACE(); 28 DECLARE_VIRTUAL_TRACE();
29 29
30 static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const C SSValue&); 30 static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const C SSValue&, CSSPropertyID = CSSPropertyInvalid);
31 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange); 31 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange);
32 32
33 private: 33 private:
34 LengthStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRan ge range) 34 LengthStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRan ge range)
35 : StyleInterpolation(start, end, id) 35 : StyleInterpolation(start, end, id)
36 , m_range(range) 36 , m_range(range)
37 { } 37 { }
38 38
39 InterpolationRange m_range; 39 InterpolationRange m_range;
40 }; 40 };
41 41
42 } 42 }
43 43
44 #endif 44 #endif
OLDNEW
« no previous file with comments | « LayoutTests/transitions/unprefixed-perspective.html ('k') | Source/core/animation/LengthStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698