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

Side by Side Diff: Source/core/animation/css/CSSAnimations.h

Issue 98663004: Add support for unprefixed CSS Transforms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 { 67 {
68 m_cancelledAnimationNames.append(name); 68 m_cancelledAnimationNames.append(name);
69 for (HashSet<RefPtr<AnimationPlayer> >::const_iterator iter = players.be gin(); iter != players.end(); ++iter) 69 for (HashSet<RefPtr<AnimationPlayer> >::const_iterator iter = players.be gin(); iter != players.end(); ++iter)
70 m_cancelledAnimationAnimationPlayers.add(iter->get()); 70 m_cancelledAnimationAnimationPlayers.add(iter->get());
71 } 71 }
72 void toggleAnimationPaused(const AtomicString& name) 72 void toggleAnimationPaused(const AtomicString& name)
73 { 73 {
74 m_animationsWithPauseToggled.append(name); 74 m_animationsWithPauseToggled.append(name);
75 } 75 }
76 76
77 void startTransition(CSSPropertyID id, const AnimatableValue* from, const An imatableValue* to, PassRefPtr<InertAnimation> animation) 77 void startTransition(CSSPropertyID id, CSSPropertyID eventId, const Animatab leValue* from, const AnimatableValue* to, PassRefPtr<InertAnimation> animation)
78 { 78 {
79 NewTransition newTransition; 79 NewTransition newTransition;
80 newTransition.id = id; 80 newTransition.id = id;
81 newTransition.eventId = eventId;
81 newTransition.from = from; 82 newTransition.from = from;
82 newTransition.to = to; 83 newTransition.to = to;
83 newTransition.animation = animation; 84 newTransition.animation = animation;
84 m_newTransitions.set(id, newTransition); 85 m_newTransitions.set(id, newTransition);
85 } 86 }
86 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans itions.contains(id); } 87 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans itions.contains(id); }
87 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); } 88 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); }
88 89
89 struct NewAnimation { 90 struct NewAnimation {
90 AtomicString name; 91 AtomicString name;
91 HashSet<RefPtr<InertAnimation> > animations; 92 HashSet<RefPtr<InertAnimation> > animations;
92 }; 93 };
93 const Vector<NewAnimation>& newAnimations() const { return m_newAnimations; } 94 const Vector<NewAnimation>& newAnimations() const { return m_newAnimations; }
94 const Vector<AtomicString>& cancelledAnimationNames() const { return m_cance lledAnimationNames; } 95 const Vector<AtomicString>& cancelledAnimationNames() const { return m_cance lledAnimationNames; }
95 const HashSet<const AnimationPlayer*>& cancelledAnimationAnimationPlayers() const { return m_cancelledAnimationAnimationPlayers; } 96 const HashSet<const AnimationPlayer*>& cancelledAnimationAnimationPlayers() const { return m_cancelledAnimationAnimationPlayers; }
96 const Vector<AtomicString>& animationsWithPauseToggled() const { return m_an imationsWithPauseToggled; } 97 const Vector<AtomicString>& animationsWithPauseToggled() const { return m_an imationsWithPauseToggled; }
97 98
98 struct NewTransition { 99 struct NewTransition {
99 CSSPropertyID id; 100 CSSPropertyID id;
101 CSSPropertyID eventId;
100 const AnimatableValue* from; 102 const AnimatableValue* from;
101 const AnimatableValue* to; 103 const AnimatableValue* to;
102 RefPtr<InertAnimation> animation; 104 RefPtr<InertAnimation> animation;
103 }; 105 };
104 typedef HashMap<CSSPropertyID, NewTransition> NewTransitionMap; 106 typedef HashMap<CSSPropertyID, NewTransition> NewTransitionMap;
105 const NewTransitionMap& newTransitions() const { return m_newTransitions; } 107 const NewTransitionMap& newTransitions() const { return m_newTransitions; }
106 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; } 108 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; }
107 109
108 void adoptActiveInterpolationsForAnimations(HashMap<CSSPropertyID, RefPtr<In terpolation> >& newMap) { newMap.swap(m_activeInterpolationsForAnimations); } 110 void adoptActiveInterpolationsForAnimations(HashMap<CSSPropertyID, RefPtr<In terpolation> >& newMap) { newMap.swap(m_activeInterpolationsForAnimations); }
109 void adoptActiveInterpolationsForTransitions(HashMap<CSSPropertyID, RefPtr<I nterpolation> >& newMap) { newMap.swap(m_activeInterpolationsForTransitions); } 111 void adoptActiveInterpolationsForTransitions(HashMap<CSSPropertyID, RefPtr<I nterpolation> >& newMap) { newMap.swap(m_activeInterpolationsForTransitions); }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; 208 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE;
207 private: 209 private:
208 Element* m_target; 210 Element* m_target;
209 const CSSPropertyID m_property; 211 const CSSPropertyID m_property;
210 }; 212 };
211 }; 213 };
212 214
213 } // namespace WebCore 215 } // namespace WebCore
214 216
215 #endif 217 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698