Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: Source/core/animation/KeyframeAnimationEffect.h

Issue 23875044: Web Animations: Correctly handle incomplete keyframes in CSS animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Handle end keyframes first Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
53 } 53 }
54 static bool compareOffsets(const RefPtr<Keyframe>& a, const RefPtr<Keyframe> & b) 54 static bool compareOffsets(const RefPtr<Keyframe>& a, const RefPtr<Keyframe> & b)
55 { 55 {
56 return a->offset() < b->offset(); 56 return a->offset() < b->offset();
57 } 57 }
58 void setOffset(double offset) { m_offset = offset; } 58 void setOffset(double offset) { m_offset = offset; }
59 double offset() const { return m_offset; } 59 double offset() const { return m_offset; }
60 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi te = composite; } 60 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi te = composite; }
61 AnimationEffect::CompositeOperation composite() const { return m_composite; } 61 AnimationEffect::CompositeOperation composite() const { return m_composite; }
62 void setPropertyValue(CSSPropertyID, const AnimatableValue*); 62 void setPropertyValue(CSSPropertyID, const AnimatableValue*);
63 void clearPropertyValue(CSSPropertyID);
63 const AnimatableValue* propertyValue(CSSPropertyID) const; 64 const AnimatableValue* propertyValue(CSSPropertyID) const;
64 PropertySet properties() const; 65 PropertySet properties() const;
65 PassRefPtr<Keyframe> cloneWithOffset(double offset) const; 66 PassRefPtr<Keyframe> cloneWithOffset(double offset) const;
66 private: 67 private:
67 Keyframe(); 68 Keyframe();
68 double m_offset; 69 double m_offset;
69 AnimationEffect::CompositeOperation m_composite; 70 AnimationEffect::CompositeOperation m_composite;
70 typedef HashMap<CSSPropertyID, RefPtr<AnimatableValue> > PropertyValueMap; 71 typedef HashMap<CSSPropertyID, RefPtr<AnimatableValue> > PropertyValueMap;
71 PropertyValueMap m_propertyValues; 72 PropertyValueMap m_propertyValues;
72 }; 73 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // The spec describes filtering the normalized keyframes at sampling time 122 // The spec describes filtering the normalized keyframes at sampling time
122 // to get the 'property-specific keyframes'. For efficiency, we cache the 123 // to get the 'property-specific keyframes'. For efficiency, we cache the
123 // property-specific lists. 124 // property-specific lists.
124 typedef HashMap<CSSPropertyID, OwnPtr<PropertySpecificKeyframeGroup> > Keyfr ameGroupMap; 125 typedef HashMap<CSSPropertyID, OwnPtr<PropertySpecificKeyframeGroup> > Keyfr ameGroupMap;
125 OwnPtr<KeyframeGroupMap> m_keyframeGroups; 126 OwnPtr<KeyframeGroupMap> m_keyframeGroups;
126 }; 127 };
127 128
128 } // namespace WebCore 129 } // namespace WebCore
129 130
130 #endif // KeyframeAnimationEffect_h 131 #endif // KeyframeAnimationEffect_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698