OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "core/animation/animatable/AnimatableRepeatable.h" | 35 #include "core/animation/animatable/AnimatableRepeatable.h" |
36 #include "core/style/SVGComputedStyleDefs.h" | 36 #include "core/style/SVGComputedStyleDefs.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class CORE_EXPORT AnimatableStrokeDasharrayList final : public AnimatableRepeata
ble { | 40 class CORE_EXPORT AnimatableStrokeDasharrayList final : public AnimatableRepeata
ble { |
41 public: | 41 public: |
42 ~AnimatableStrokeDasharrayList() override { } | 42 ~AnimatableStrokeDasharrayList() override { } |
43 | 43 |
44 static PassRefPtrWillBeRawPtr<AnimatableStrokeDasharrayList> create(PassRefP
tr<SVGDashArray> lengths, float zoom) | 44 static AnimatableStrokeDasharrayList* create(PassRefPtr<SVGDashArray> length
s, float zoom) |
45 { | 45 { |
46 return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(lengths, zoo
m)); | 46 return new AnimatableStrokeDasharrayList(lengths, zoom); |
47 } | 47 } |
48 | 48 |
49 PassRefPtr<SVGDashArray> toSVGDashArray(float zoom) const; | 49 PassRefPtr<SVGDashArray> toSVGDashArray(float zoom) const; |
50 | 50 |
51 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
52 | 52 |
53 protected: | 53 protected: |
54 PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue*
, double fraction) const override; | 54 AnimatableValue* interpolateTo(const AnimatableValue*, double fraction) cons
t override; |
55 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; | 55 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; |
56 | 56 |
57 private: | 57 private: |
58 AnimatableStrokeDasharrayList(PassRefPtr<SVGDashArray>, float zoom); | 58 AnimatableStrokeDasharrayList(PassRefPtr<SVGDashArray>, float zoom); |
59 // This will consume the vector passed into it. | 59 // This will consume the vector passed into it. |
60 AnimatableStrokeDasharrayList(WillBeHeapVector<RefPtrWillBeMember<Animatable
Value>>& values) | 60 AnimatableStrokeDasharrayList(HeapVector<Member<AnimatableValue>>& values) |
61 : AnimatableRepeatable(values) | 61 : AnimatableRepeatable(values) |
62 { | 62 { |
63 } | 63 } |
64 | 64 |
65 AnimatableType type() const override { return TypeStrokeDasharrayList; } | 65 AnimatableType type() const override { return TypeStrokeDasharrayList; } |
66 }; | 66 }; |
67 | 67 |
68 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableStrokeDasharrayList, isStrokeDashar
rayList()); | 68 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableStrokeDasharrayList, isStrokeDashar
rayList()); |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
71 | 71 |
72 #endif // AnimatableStrokeDasharrayList_h | 72 #endif // AnimatableStrokeDasharrayList_h |
OLD | NEW |