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

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

Issue 2236583003: Rename AnimationEffect to AnimationEffectReadOnly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deprecated-assert
Patch Set: Rebase Created 4 years, 4 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations; 139 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations;
140 140
141 static void calculateCompositorAnimationUpdate(CSSAnimationUpdate&, const El ement* animatingElement, Element&, const ComputedStyle&, const ComputedStyle* pa rentStyle); 141 static void calculateCompositorAnimationUpdate(CSSAnimationUpdate&, const El ement* animatingElement, Element&, const ComputedStyle&, const ComputedStyle* pa rentStyle);
142 static void calculateAnimationUpdate(CSSAnimationUpdate&, const Element* ani matingElement, Element&, const ComputedStyle&, ComputedStyle* parentStyle, Style Resolver*); 142 static void calculateAnimationUpdate(CSSAnimationUpdate&, const Element* ani matingElement, Element&, const ComputedStyle&, ComputedStyle* parentStyle, Style Resolver*);
143 static void calculateTransitionUpdate(CSSAnimationUpdate&, const Element* an imatingElement, const ComputedStyle&); 143 static void calculateTransitionUpdate(CSSAnimationUpdate&, const Element* an imatingElement, const ComputedStyle&);
144 static void calculateTransitionUpdateForProperty(CSSPropertyID, const CSSTra nsitionData&, size_t transitionIndex, const ComputedStyle& oldStyle, const Compu tedStyle&, const TransitionMap* activeTransitions, CSSAnimationUpdate&, const El ement*); 144 static void calculateTransitionUpdateForProperty(CSSPropertyID, const CSSTra nsitionData&, size_t transitionIndex, const ComputedStyle& oldStyle, const Compu tedStyle&, const TransitionMap* activeTransitions, CSSAnimationUpdate&, const El ement*);
145 145
146 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate&, cons t Element* animatingElement); 146 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate&, cons t Element* animatingElement);
147 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate&, con st Element* animatingElement); 147 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate&, con st Element* animatingElement);
148 148
149 class AnimationEventDelegate final : public AnimationEffect::EventDelegate { 149 class AnimationEventDelegate final : public AnimationEffectReadOnly::EventDe legate {
150 public: 150 public:
151 AnimationEventDelegate(Element* animationTarget, const AtomicString& nam e) 151 AnimationEventDelegate(Element* animationTarget, const AtomicString& nam e)
152 : m_animationTarget(animationTarget) 152 : m_animationTarget(animationTarget)
153 , m_name(name) 153 , m_name(name)
154 , m_previousPhase(AnimationEffect::PhaseNone) 154 , m_previousPhase(AnimationEffectReadOnly::PhaseNone)
155 , m_previousIteration(nullValue()) 155 , m_previousIteration(nullValue())
156 { 156 {
157 } 157 }
158 bool requiresIterationEvents(const AnimationEffect&) override; 158 bool requiresIterationEvents(const AnimationEffectReadOnly&) override;
159 void onEventCondition(const AnimationEffect&) override; 159 void onEventCondition(const AnimationEffectReadOnly&) override;
160 DECLARE_VIRTUAL_TRACE(); 160 DECLARE_VIRTUAL_TRACE();
161 161
162 private: 162 private:
163 const Element& animationTarget() const { return *m_animationTarget; } 163 const Element& animationTarget() const { return *m_animationTarget; }
164 EventTarget* eventTarget() const; 164 EventTarget* eventTarget() const;
165 Document& document() const { return m_animationTarget->document(); } 165 Document& document() const { return m_animationTarget->document(); }
166 166
167 void maybeDispatch(Document::ListenerType, const AtomicString& eventName , double elapsedTime); 167 void maybeDispatch(Document::ListenerType, const AtomicString& eventName , double elapsedTime);
168 Member<Element> m_animationTarget; 168 Member<Element> m_animationTarget;
169 const AtomicString m_name; 169 const AtomicString m_name;
170 AnimationEffect::Phase m_previousPhase; 170 AnimationEffectReadOnly::Phase m_previousPhase;
171 double m_previousIteration; 171 double m_previousIteration;
172 }; 172 };
173 173
174 class TransitionEventDelegate final : public AnimationEffect::EventDelegate { 174 class TransitionEventDelegate final : public AnimationEffectReadOnly::EventD elegate {
175 public: 175 public:
176 TransitionEventDelegate(Element* transitionTarget, CSSPropertyID propert y) 176 TransitionEventDelegate(Element* transitionTarget, CSSPropertyID propert y)
177 : m_transitionTarget(transitionTarget) 177 : m_transitionTarget(transitionTarget)
178 , m_property(property) 178 , m_property(property)
179 , m_previousPhase(AnimationEffect::PhaseNone) 179 , m_previousPhase(AnimationEffectReadOnly::PhaseNone)
180 { 180 {
181 } 181 }
182 bool requiresIterationEvents(const AnimationEffect&) override { return f alse; } 182 bool requiresIterationEvents(const AnimationEffectReadOnly&) override { return false; }
183 void onEventCondition(const AnimationEffect&) override; 183 void onEventCondition(const AnimationEffectReadOnly&) override;
184 DECLARE_VIRTUAL_TRACE(); 184 DECLARE_VIRTUAL_TRACE();
185 185
186 private: 186 private:
187 const Element& transitionTarget() const { return *m_transitionTarget; } 187 const Element& transitionTarget() const { return *m_transitionTarget; }
188 EventTarget* eventTarget() const; 188 EventTarget* eventTarget() const;
189 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId(); } 189 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId(); }
190 Document& document() const { return m_transitionTarget->document(); } 190 Document& document() const { return m_transitionTarget->document(); }
191 191
192 Member<Element> m_transitionTarget; 192 Member<Element> m_transitionTarget;
193 const CSSPropertyID m_property; 193 const CSSPropertyID m_property;
194 AnimationEffect::Phase m_previousPhase; 194 AnimationEffectReadOnly::Phase m_previousPhase;
195 }; 195 };
196 }; 196 };
197 197
198 } // namespace blink 198 } // namespace blink
199 199
200 #endif 200 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698