| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 typedef HashSet<CSSPropertyID> PropertySet; | 45 typedef HashSet<CSSPropertyID> PropertySet; |
| 46 | 46 |
| 47 // Represents the keyframes set through the API. | 47 // Represents the keyframes set through the API. |
| 48 class Keyframe : public RefCounted<Keyframe> { | 48 class Keyframe : public RefCounted<Keyframe> { |
| 49 public: | 49 public: |
| 50 static PassRefPtr<Keyframe> create() | 50 static PassRefPtr<Keyframe> create() |
| 51 { | 51 { |
| 52 return adoptRef(new Keyframe); | 52 return adoptRef(new Keyframe); |
| 53 } | 53 } |
| 54 static bool compareOffsets(const RefPtr<Keyframe>& a, const RefPtr<Keyframe>
& b) |
| 55 { |
| 56 return a->offset() < b->offset(); |
| 57 } |
| 54 void setOffset(double offset) { m_offset = offset; } | 58 void setOffset(double offset) { m_offset = offset; } |
| 55 double offset() const { return m_offset; } | 59 double offset() const { return m_offset; } |
| 56 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi
te = composite; } | 60 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi
te = composite; } |
| 57 AnimationEffect::CompositeOperation composite() const { return m_composite;
} | 61 AnimationEffect::CompositeOperation composite() const { return m_composite;
} |
| 58 void setPropertyValue(CSSPropertyID, const AnimatableValue*); | 62 void setPropertyValue(CSSPropertyID, const AnimatableValue*); |
| 59 const AnimatableValue* propertyValue(CSSPropertyID) const; | 63 const AnimatableValue* propertyValue(CSSPropertyID) const; |
| 60 PropertySet properties() const; | 64 PropertySet properties() const; |
| 61 private: | 65 private: |
| 62 Keyframe(); | 66 Keyframe(); |
| 63 double m_offset; | 67 double m_offset; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // The spec describes filtering the normalized keyframes at sampling time | 120 // The spec describes filtering the normalized keyframes at sampling time |
| 117 // to get the 'property-specific keyframes'. For efficiency, we cache the | 121 // to get the 'property-specific keyframes'. For efficiency, we cache the |
| 118 // property-specific lists. | 122 // property-specific lists. |
| 119 typedef HashMap<CSSPropertyID, OwnPtr<PropertySpecificKeyframeGroup> > Keyfr
ameGroupMap; | 123 typedef HashMap<CSSPropertyID, OwnPtr<PropertySpecificKeyframeGroup> > Keyfr
ameGroupMap; |
| 120 OwnPtr<KeyframeGroupMap> m_keyframeGroups; | 124 OwnPtr<KeyframeGroupMap> m_keyframeGroups; |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 } // namespace WebCore | 127 } // namespace WebCore |
| 124 | 128 |
| 125 #endif // KeyframeAnimationEffect_h | 129 #endif // KeyframeAnimationEffect_h |
| OLD | NEW |