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

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

Issue 983103003: Use Length for the stroke-width property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust transitions/svg-transitions.html 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 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.
4
5 #ifndef SVGLengthStyleInterpolation_h
6 #define SVGLengthStyleInterpolation_h
7
8 #include "core/animation/StyleInterpolation.h"
9 #include "core/css/CSSPrimitiveValue.h"
10 #include "platform/Length.h"
11
12 namespace blink {
13
14 class SVGLengthStyleInterpolation : public StyleInterpolation {
15 public:
16 static PassRefPtrWillBeRawPtr<SVGLengthStyleInterpolation> maybeCreate(const CSSValue& start, const CSSValue& end, CSSPropertyID, InterpolationRange);
17
18 virtual void apply(StyleResolverState&) const override;
19
20 DEFINE_INLINE_VIRTUAL_TRACE()
21 {
22 StyleInterpolation::trace(visitor);
23 }
24
25 private:
26 SVGLengthStyleInterpolation(const CSSPrimitiveValue& start, const CSSPrimiti veValue& end, CSSPropertyID, CSSPrimitiveValue::UnitType, InterpolationRange);
27
28 static bool canCreateFrom(const CSSValue&);
29 static CSSPrimitiveValue::UnitType commonUnitType(const CSSPrimitiveValue& s tart, const CSSPrimitiveValue& end);
30 static PassOwnPtrWillBeRawPtr<InterpolableValue> lengthToInterpolableValue(c onst CSSPrimitiveValue&);
31 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> interpolableValueToLength(c onst InterpolableValue&, CSSPrimitiveValue::UnitType, InterpolationRange);
32
33 CSSPrimitiveValue::UnitType m_type;
34 InterpolationRange m_range;
35
36 friend class AnimationSVGLengthStyleInterpolationTest;
37 friend class SVGStrokeDasharrayStyleInterpolation;
38 };
39
40 }
41
42 #endif // SVGLengthStyleInterpolation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698