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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 class KeyframeEffectModelBase : public AnimationEffect { | 53 class KeyframeEffectModelBase : public AnimationEffect { |
54 public: | 54 public: |
55 // FIXME: Implement accumulation. | 55 // FIXME: Implement accumulation. |
56 | 56 |
57 using PropertySpecificKeyframeVector = WillBeHeapVector<OwnPtrWillBeMember<K
eyframe::PropertySpecificKeyframe>>; | 57 using PropertySpecificKeyframeVector = WillBeHeapVector<OwnPtrWillBeMember<K
eyframe::PropertySpecificKeyframe>>; |
58 class PropertySpecificKeyframeGroup : public NoBaseWillBeGarbageCollected<Pr
opertySpecificKeyframeGroup> { | 58 class PropertySpecificKeyframeGroup : public NoBaseWillBeGarbageCollected<Pr
opertySpecificKeyframeGroup> { |
59 public: | 59 public: |
60 void appendKeyframe(PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKey
frame>); | 60 void appendKeyframe(PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKey
frame>); |
61 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } | 61 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } |
62 | 62 |
63 void trace(Visitor*); | 63 DECLARE_TRACE(); |
64 | 64 |
65 private: | 65 private: |
66 void removeRedundantKeyframes(); | 66 void removeRedundantKeyframes(); |
67 bool addSyntheticKeyframeIfRequired(PassRefPtr<TimingFunction> neutralKe
yframeEasing); | 67 bool addSyntheticKeyframeIfRequired(PassRefPtr<TimingFunction> neutralKe
yframeEasing); |
68 | 68 |
69 PropertySpecificKeyframeVector m_keyframes; | 69 PropertySpecificKeyframeVector m_keyframes; |
70 | 70 |
71 friend class KeyframeEffectModelBase; | 71 friend class KeyframeEffectModelBase; |
72 }; | 72 }; |
73 | 73 |
(...skipping 18 matching lines...) Expand all Loading... |
92 | 92 |
93 virtual bool isAnimatableValueKeyframeEffectModel() const { return false; } | 93 virtual bool isAnimatableValueKeyframeEffectModel() const { return false; } |
94 virtual bool isStringKeyframeEffectModel() const { return false; } | 94 virtual bool isStringKeyframeEffectModel() const { return false; } |
95 | 95 |
96 bool hasSyntheticKeyframes() const | 96 bool hasSyntheticKeyframes() const |
97 { | 97 { |
98 ensureKeyframeGroups(); | 98 ensureKeyframeGroups(); |
99 return m_hasSyntheticKeyframes; | 99 return m_hasSyntheticKeyframes; |
100 } | 100 } |
101 | 101 |
102 virtual void trace(Visitor*) override; | 102 DECLARE_VIRTUAL_TRACE(); |
103 | 103 |
104 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. | 104 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. |
105 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. | 105 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. |
106 void forceConversionsToAnimatableValues(Element* element) | 106 void forceConversionsToAnimatableValues(Element* element) |
107 { | 107 { |
108 ensureKeyframeGroups(); | 108 ensureKeyframeGroups(); |
109 ensureInterpolationEffect(element); | 109 ensureInterpolationEffect(element); |
110 } | 110 } |
111 | 111 |
112 // FIXME: Remove this once CompositorAnimations no longer depends on Animata
bleValues | 112 // FIXME: Remove this once CompositorAnimations no longer depends on Animata
bleValues |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 template <> | 208 template <> |
209 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } | 209 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } |
210 | 210 |
211 template <> | 211 template <> |
212 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } | 212 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
215 | 215 |
216 #endif // KeyframeEffectModel_h | 216 #endif // KeyframeEffectModel_h |
OLD | NEW |