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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 virtual ~AnimatableRepeatable() { } | 43 virtual ~AnimatableRepeatable() { } |
44 | 44 |
45 // This will consume the vector passed into it. | 45 // This will consume the vector passed into it. |
46 static PassRefPtrWillBeRawPtr<AnimatableRepeatable> create(WillBeHeapVector<
RefPtrWillBeMember<AnimatableValue> >& values) | 46 static PassRefPtrWillBeRawPtr<AnimatableRepeatable> create(WillBeHeapVector<
RefPtrWillBeMember<AnimatableValue> >& values) |
47 { | 47 { |
48 return adoptRefWillBeNoop(new AnimatableRepeatable(values)); | 48 return adoptRefWillBeNoop(new AnimatableRepeatable(values)); |
49 } | 49 } |
50 | 50 |
51 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values() const
{ return m_values; } | 51 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values() const
{ return m_values; } |
52 | 52 |
53 virtual void trace(Visitor*) OVERRIDE; | 53 virtual void trace(Visitor*) override; |
54 | 54 |
55 protected: | 55 protected: |
56 AnimatableRepeatable() | 56 AnimatableRepeatable() |
57 { | 57 { |
58 } | 58 } |
59 AnimatableRepeatable(WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >&
values) | 59 AnimatableRepeatable(WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >&
values) |
60 { | 60 { |
61 ASSERT(!values.isEmpty()); | 61 ASSERT(!values.isEmpty()); |
62 m_values.swap(values); | 62 m_values.swap(values); |
63 } | 63 } |
64 | 64 |
65 static bool interpolateLists(const WillBeHeapVector<RefPtrWillBeMember<Anima
tableValue> >& fromValues, const WillBeHeapVector<RefPtrWillBeMember<AnimatableV
alue> >& toValues, double fraction, WillBeHeapVector<RefPtrWillBeMember<Animatab
leValue> >& interpolatedValues); | 65 static bool interpolateLists(const WillBeHeapVector<RefPtrWillBeMember<Anima
tableValue> >& fromValues, const WillBeHeapVector<RefPtrWillBeMember<AnimatableV
alue> >& toValues, double fraction, WillBeHeapVector<RefPtrWillBeMember<Animatab
leValue> >& interpolatedValues); |
66 | 66 |
67 virtual bool usesDefaultInterpolationWith(const AnimatableValue*) const OVER
RIDE; | 67 virtual bool usesDefaultInterpolationWith(const AnimatableValue*) const over
ride; |
68 | 68 |
69 WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > m_values; | 69 WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > m_values; |
70 | 70 |
71 private: | 71 private: |
72 virtual PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const Animatab
leValue*, double fraction) const OVERRIDE; | 72 virtual PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const Animatab
leValue*, double fraction) const override; |
73 | 73 |
74 virtual AnimatableType type() const OVERRIDE { return TypeRepeatable; } | 74 virtual AnimatableType type() const override { return TypeRepeatable; } |
75 virtual bool equalTo(const AnimatableValue*) const OVERRIDE FINAL; | 75 virtual bool equalTo(const AnimatableValue*) const override final; |
76 }; | 76 }; |
77 | 77 |
78 DEFINE_TYPE_CASTS(AnimatableRepeatable, AnimatableValue, value, (value->isRepeat
able() || value->isStrokeDasharrayList()), (value.isRepeatable() || value.isStro
keDasharrayList())); | 78 DEFINE_TYPE_CASTS(AnimatableRepeatable, AnimatableValue, value, (value->isRepeat
able() || value->isStrokeDasharrayList()), (value.isRepeatable() || value.isStro
keDasharrayList())); |
79 | 79 |
80 } // namespace blink | 80 } // namespace blink |
81 | 81 |
82 #endif // AnimatableRepeatable_h | 82 #endif // AnimatableRepeatable_h |
OLD | NEW |