| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 double keyTime() const { return m_keyTime; } | 53 double keyTime() const { return m_keyTime; } |
| 54 const TimingFunction* timingFunction() const { return m_timingFunction.get()
; } | 54 const TimingFunction* timingFunction() const { return m_timingFunction.get()
; } |
| 55 virtual PassOwnPtr<AnimationValue> clone() const = 0; | 55 virtual PassOwnPtr<AnimationValue> clone() const = 0; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 double m_keyTime; | 58 double m_keyTime; |
| 59 RefPtr<TimingFunction> m_timingFunction; | 59 RefPtr<TimingFunction> m_timingFunction; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 // Used to store one float value of an animation. | 62 // Used to store one float value of an animation. |
| 63 class FloatAnimationValue : public AnimationValue { | 63 class FloatAnimationValue FINAL : public AnimationValue { |
| 64 public: | 64 public: |
| 65 FloatAnimationValue(double keyTime, float value, PassRefPtr<TimingFunction>
timingFunction = 0) | 65 FloatAnimationValue(double keyTime, float value, PassRefPtr<TimingFunction>
timingFunction = 0) |
| 66 : AnimationValue(keyTime, timingFunction) | 66 : AnimationValue(keyTime, timingFunction) |
| 67 , m_value(value) | 67 , m_value(value) |
| 68 { | 68 { |
| 69 } | 69 } |
| 70 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new FloatAnimationValue(*this)); } | 70 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new FloatAnimationValue(*this)); } |
| 71 | 71 |
| 72 float value() const { return m_value; } | 72 float value() const { return m_value; } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 float m_value; | 75 float m_value; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // Used to store one transform value in a keyframe list. | 78 // Used to store one transform value in a keyframe list. |
| 79 class TransformAnimationValue : public AnimationValue { | 79 class TransformAnimationValue FINAL : public AnimationValue { |
| 80 public: | 80 public: |
| 81 explicit TransformAnimationValue(double keyTime, const TransformOperations*
value = 0, PassRefPtr<TimingFunction> timingFunction = 0) | 81 explicit TransformAnimationValue(double keyTime, const TransformOperations*
value = 0, PassRefPtr<TimingFunction> timingFunction = 0) |
| 82 : AnimationValue(keyTime, timingFunction) | 82 : AnimationValue(keyTime, timingFunction) |
| 83 { | 83 { |
| 84 if (value) | 84 if (value) |
| 85 m_value = *value; | 85 m_value = *value; |
| 86 } | 86 } |
| 87 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new TransformAnimationValue(*this)); } | 87 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new TransformAnimationValue(*this)); } |
| 88 | 88 |
| 89 const TransformOperations* value() const { return &m_value; } | 89 const TransformOperations* value() const { return &m_value; } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 TransformOperations m_value; | 92 TransformOperations m_value; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // Used to store one filter value in a keyframe list. | 95 // Used to store one filter value in a keyframe list. |
| 96 class FilterAnimationValue : public AnimationValue { | 96 class FilterAnimationValue FINAL : public AnimationValue { |
| 97 public: | 97 public: |
| 98 explicit FilterAnimationValue(double keyTime, const FilterOperations* value
= 0, PassRefPtr<TimingFunction> timingFunction = 0) | 98 explicit FilterAnimationValue(double keyTime, const FilterOperations* value
= 0, PassRefPtr<TimingFunction> timingFunction = 0) |
| 99 : AnimationValue(keyTime, timingFunction) | 99 : AnimationValue(keyTime, timingFunction) |
| 100 { | 100 { |
| 101 if (value) | 101 if (value) |
| 102 m_value = *value; | 102 m_value = *value; |
| 103 } | 103 } |
| 104 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new FilterAnimationValue(*this)); } | 104 virtual PassOwnPtr<AnimationValue> clone() const OVERRIDE { return adoptPtr(
new FilterAnimationValue(*this)); } |
| 105 | 105 |
| 106 const FilterOperations* value() const { return &m_value; } | 106 const FilterOperations* value() const { return &m_value; } |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 FilterOperations m_value; | 109 FilterOperations m_value; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace WebCore | 112 } // namespace WebCore |
| 113 | 113 |
| 114 #endif // AnimationValue_h | 114 #endif // AnimationValue_h |
| OLD | NEW |