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

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

Issue 211233003: CSS Transforms: Implement perspective (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Disable compositing assert hit by new tests. Created 6 years, 8 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void cancelAnimation(const AtomicString& name, AnimationPlayer& player) 66 void cancelAnimation(const AtomicString& name, AnimationPlayer& player)
67 { 67 {
68 m_cancelledAnimationNames.append(name); 68 m_cancelledAnimationNames.append(name);
69 m_cancelledAnimationPlayers.add(&player); 69 m_cancelledAnimationPlayers.add(&player);
70 } 70 }
71 void toggleAnimationPaused(const AtomicString& name) 71 void toggleAnimationPaused(const AtomicString& name)
72 { 72 {
73 m_animationsWithPauseToggled.append(name); 73 m_animationsWithPauseToggled.append(name);
74 } 74 }
75 75
76 void startTransition(CSSPropertyID id, const AnimatableValue* from, const An imatableValue* to, PassRefPtr<InertAnimation> animation) 76 void startTransition(CSSPropertyID id, CSSPropertyID eventId, const Animatab leValue* from, const AnimatableValue* to, PassRefPtr<InertAnimation> animation)
77 { 77 {
78 NewTransition newTransition; 78 NewTransition newTransition;
79 newTransition.id = id; 79 newTransition.id = id;
80 newTransition.eventId = eventId;
80 newTransition.from = from; 81 newTransition.from = from;
81 newTransition.to = to; 82 newTransition.to = to;
82 newTransition.animation = animation; 83 newTransition.animation = animation;
83 m_newTransitions.set(id, newTransition); 84 m_newTransitions.set(id, newTransition);
84 } 85 }
85 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans itions.contains(id); } 86 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans itions.contains(id); }
86 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); } 87 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); }
87 88
88 struct NewAnimation { 89 struct NewAnimation {
89 AtomicString name; 90 AtomicString name;
90 RefPtr<InertAnimation> animation; 91 RefPtr<InertAnimation> animation;
91 }; 92 };
92 const Vector<NewAnimation>& newAnimations() const { return m_newAnimations; } 93 const Vector<NewAnimation>& newAnimations() const { return m_newAnimations; }
93 const Vector<AtomicString>& cancelledAnimationNames() const { return m_cance lledAnimationNames; } 94 const Vector<AtomicString>& cancelledAnimationNames() const { return m_cance lledAnimationNames; }
94 const HashSet<const AnimationPlayer*>& cancelledAnimationAnimationPlayers() const { return m_cancelledAnimationPlayers; } 95 const HashSet<const AnimationPlayer*>& cancelledAnimationAnimationPlayers() const { return m_cancelledAnimationPlayers; }
95 const Vector<AtomicString>& animationsWithPauseToggled() const { return m_an imationsWithPauseToggled; } 96 const Vector<AtomicString>& animationsWithPauseToggled() const { return m_an imationsWithPauseToggled; }
96 97
97 struct NewTransition { 98 struct NewTransition {
98 ALLOW_ONLY_INLINE_ALLOCATION(); 99 ALLOW_ONLY_INLINE_ALLOCATION();
99 public: 100 public:
100 void trace(Visitor* visitor) 101 void trace(Visitor* visitor)
101 { 102 {
102 visitor->trace(from); 103 visitor->trace(from);
103 visitor->trace(to); 104 visitor->trace(to);
104 } 105 }
105 106
106 CSSPropertyID id; 107 CSSPropertyID id;
108 CSSPropertyID eventId;
107 RawPtrWillBeMember<const AnimatableValue> from; 109 RawPtrWillBeMember<const AnimatableValue> from;
108 RawPtrWillBeMember<const AnimatableValue> to; 110 RawPtrWillBeMember<const AnimatableValue> to;
109 RefPtr<InertAnimation> animation; 111 RefPtr<InertAnimation> animation;
110 }; 112 };
111 typedef WillBeHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap; 113 typedef WillBeHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap;
112 const NewTransitionMap& newTransitions() const { return m_newTransitions; } 114 const NewTransitionMap& newTransitions() const { return m_newTransitions; }
113 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; } 115 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; }
114 116
115 void adoptActiveInterpolationsForAnimations(WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >& newMap) { newMap.swap(m_activeInterpolatio nsForAnimations); } 117 void adoptActiveInterpolationsForAnimations(WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >& newMap) { newMap.swap(m_activeInterpolatio nsForAnimations); }
116 void adoptActiveInterpolationsForTransitions(WillBeHeapHashMap<CSSPropertyID , RefPtrWillBeMember<Interpolation> >& newMap) { newMap.swap(m_activeInterpolati onsForTransitions); } 118 void adoptActiveInterpolationsForTransitions(WillBeHeapHashMap<CSSPropertyID , RefPtrWillBeMember<Interpolation> >& newMap) { newMap.swap(m_activeInterpolati onsForTransitions); }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; 227 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE;
226 private: 228 private:
227 Element* m_target; 229 Element* m_target;
228 const CSSPropertyID m_property; 230 const CSSPropertyID m_property;
229 }; 231 };
230 }; 232 };
231 233
232 } // namespace WebCore 234 } // namespace WebCore
233 235
234 #endif 236 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimatableValueFactory.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698