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

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

Issue 1215563002: Implement left property animation on InvalidatableStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make Windows not crash Created 5 years, 5 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 | Annotate | Revision Log
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/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 14 matching lines...) Expand all
25 } 25 }
26 26
27 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali d); 27 static bool canCreateFrom(const CSSValue&, CSSPropertyID = CSSPropertyInvali d);
28 28
29 void apply(StyleResolverState&) const override; 29 void apply(StyleResolverState&) const override;
30 30
31 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
32 32
33 static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const C SSValue&, CSSPropertyID = CSSPropertyInvalid); 33 static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(const C SSValue&, CSSPropertyID = CSSPropertyInvalid);
34 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange); 34 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> fromInterpolableValue(const InterpolableValue&, InterpolationRange);
35 static void applyInterpolableValue(CSSPropertyID, const InterpolableValue&, InterpolationRange, StyleResolverState&, LengthSetter);
35 36
36 private: 37 private:
37 LengthStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRang e range) 38 LengthStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pa ssOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRang e range)
38 : StyleInterpolation(start, end, id) 39 : StyleInterpolation(start, end, id)
39 , m_range(range) 40 , m_range(range)
40 , m_lengthSetter(nullptr) 41 , m_lengthSetter(nullptr)
41 { 42 {
42 if (isPixelsOrPercentOnly(*m_start) && isPixelsOrPercentOnly(*m_end)) 43 if (isPixelsOrPercentOnly(*m_start) && isPixelsOrPercentOnly(*m_end))
43 m_lengthSetter = lengthSetterForProperty(id); 44 m_lengthSetter = lengthSetterForProperty(id);
44 } 45 }
45 46
46 static bool isPixelsOrPercentOnly(const InterpolableValue&); 47 static bool isPixelsOrPercentOnly(const InterpolableValue&);
47 static LengthSetter lengthSetterForProperty(CSSPropertyID); 48 static LengthSetter lengthSetterForProperty(CSSPropertyID);
48 49
49 InterpolationRange m_range; 50 InterpolationRange m_range;
50 LengthSetter m_lengthSetter; 51 LengthSetter m_lengthSetter;
51 }; 52 };
52 53
53 } 54 }
54 55
55 #endif 56 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/LengthPropertyFunctions.cpp ('k') | Source/core/animation/LengthStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698