| 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 PassRefPtr<AnimatableStrokeDasharrayList> create(PassRefPtr<SVGDashAr
ray> lengths, float zoom) |
| 45 { | 45 { |
| 46 return adoptRefWillBeNoop(new AnimatableStrokeDasharrayList(lengths, zoo
m)); | 46 return adoptRef(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(); | |
| 52 | |
| 53 protected: | 51 protected: |
| 54 PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue*
, double fraction) const override; | 52 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fra
ction) const override; |
| 55 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; | 53 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; |
| 56 | 54 |
| 57 private: | 55 private: |
| 58 AnimatableStrokeDasharrayList(PassRefPtr<SVGDashArray>, float zoom); | 56 AnimatableStrokeDasharrayList(PassRefPtr<SVGDashArray>, float zoom); |
| 59 // This will consume the vector passed into it. | 57 // This will consume the vector passed into it. |
| 60 AnimatableStrokeDasharrayList(WillBeHeapVector<RefPtrWillBeMember<Animatable
Value>>& values) | 58 AnimatableStrokeDasharrayList(Vector<RefPtr<AnimatableValue>>& values) |
| 61 : AnimatableRepeatable(values) | 59 : AnimatableRepeatable(values) |
| 62 { | 60 { |
| 63 } | 61 } |
| 64 | 62 |
| 65 AnimatableType type() const override { return TypeStrokeDasharrayList; } | 63 AnimatableType type() const override { return TypeStrokeDasharrayList; } |
| 66 }; | 64 }; |
| 67 | 65 |
| 68 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableStrokeDasharrayList, isStrokeDashar
rayList()); | 66 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableStrokeDasharrayList, isStrokeDashar
rayList()); |
| 69 | 67 |
| 70 } // namespace blink | 68 } // namespace blink |
| 71 | 69 |
| 72 #endif // AnimatableStrokeDasharrayList_h | 70 #endif // AnimatableStrokeDasharrayList_h |
| OLD | NEW |