| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/animation/AnimationEffect.h" | 35 #include "core/animation/AnimationEffect.h" |
| 36 #include "core/animation/EffectModel.h" | 36 #include "core/animation/EffectModel.h" |
| 37 #include "core/animation/InterpolationEffect.h" | 37 #include "core/animation/InterpolationEffect.h" |
| 38 #include "core/animation/PropertyHandle.h" | 38 #include "core/animation/PropertyHandle.h" |
| 39 #include "core/animation/StringKeyframe.h" | 39 #include "core/animation/StringKeyframe.h" |
| 40 #include "core/animation/animatable/AnimatableValueKeyframe.h" | 40 #include "core/animation/animatable/AnimatableValueKeyframe.h" |
| 41 #include "platform/animation/TimingFunction.h" | 41 #include "platform/animation/TimingFunction.h" |
| 42 #include "platform/heap/Handle.h" | 42 #include "platform/heap/Handle.h" |
| 43 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
| 44 #include "wtf/HashSet.h" | 44 #include "wtf/HashSet.h" |
| 45 #include "wtf/PassOwnPtr.h" | |
| 46 #include "wtf/PassRefPtr.h" | 45 #include "wtf/PassRefPtr.h" |
| 47 #include "wtf/Vector.h" | 46 #include "wtf/Vector.h" |
| 48 | 47 |
| 49 namespace blink { | 48 namespace blink { |
| 50 | 49 |
| 51 class Element; | 50 class Element; |
| 52 class KeyframeEffectModelTest; | 51 class KeyframeEffectModelTest; |
| 53 | 52 |
| 54 class CORE_EXPORT KeyframeEffectModelBase : public EffectModel { | 53 class CORE_EXPORT KeyframeEffectModelBase : public EffectModel { |
| 55 public: | 54 public: |
| 56 // FIXME: Implement accumulation. | 55 // FIXME: Implement accumulation. |
| 57 | 56 |
| 58 using PropertySpecificKeyframeVector = Vector<OwnPtr<Keyframe::PropertySpeci
ficKeyframe>>; | 57 using PropertySpecificKeyframeVector = Vector<RefPtr<Keyframe::PropertySpeci
ficKeyframe>>; |
| 59 class PropertySpecificKeyframeGroup { | 58 class PropertySpecificKeyframeGroup { |
| 60 public: | 59 public: |
| 61 void appendKeyframe(PassOwnPtr<Keyframe::PropertySpecificKeyframe>); | 60 void appendKeyframe(PassRefPtr<Keyframe::PropertySpecificKeyframe>); |
| 62 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } | 61 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } |
| 63 | 62 |
| 64 private: | 63 private: |
| 65 void removeRedundantKeyframes(); | 64 void removeRedundantKeyframes(); |
| 66 bool addSyntheticKeyframeIfRequired(PassRefPtr<TimingFunction> zeroOffse
tEasing); | 65 bool addSyntheticKeyframeIfRequired(PassRefPtr<TimingFunction> zeroOffse
tEasing); |
| 67 | 66 |
| 68 PropertySpecificKeyframeVector m_keyframes; | 67 PropertySpecificKeyframeVector m_keyframes; |
| 69 | 68 |
| 70 friend class KeyframeEffectModelBase; | 69 friend class KeyframeEffectModelBase; |
| 71 }; | 70 }; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 213 |
| 215 template <> | 214 template <> |
| 216 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } | 215 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } |
| 217 | 216 |
| 218 template <> | 217 template <> |
| 219 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } | 218 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } |
| 220 | 219 |
| 221 } // namespace blink | 220 } // namespace blink |
| 222 | 221 |
| 223 #endif // KeyframeEffectModel_h | 222 #endif // KeyframeEffectModel_h |
| OLD | NEW |