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

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

Issue 630993005: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added cpp to list Created 6 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 namespace blink { 45 namespace blink {
46 46
47 class CSSTransitionData; 47 class CSSTransitionData;
48 class Element; 48 class Element;
49 class StylePropertyShorthand; 49 class StylePropertyShorthand;
50 class StyleResolver; 50 class StyleResolver;
51 class StyleRuleKeyframes; 51 class StyleRuleKeyframes;
52 52
53 // This class stores the CSS Animations/Transitions information we use during a style recalc. 53 // This class stores the CSS Animations/Transitions information we use during a style recalc.
54 // This includes updates to animations/transitions as well as the Interpolations to be applied. 54 // This includes updates to animations/transitions as well as the Interpolations to be applied.
55 class CSSAnimationUpdate FINAL : public NoBaseWillBeGarbageCollectedFinalized<CS SAnimationUpdate> { 55 class CSSAnimationUpdate final : public NoBaseWillBeGarbageCollectedFinalized<CS SAnimationUpdate> {
56 public: 56 public:
57 void startAnimation(AtomicString& animationName, PassRefPtrWillBeRawPtr<Iner tAnimation> animation) 57 void startAnimation(AtomicString& animationName, PassRefPtrWillBeRawPtr<Iner tAnimation> animation)
58 { 58 {
59 animation->setName(animationName); 59 animation->setName(animationName);
60 NewAnimation newAnimation; 60 NewAnimation newAnimation;
61 newAnimation.name = animationName; 61 newAnimation.name = animationName;
62 newAnimation.animation = animation; 62 newAnimation.animation = animation;
63 m_newAnimations.append(newAnimation); 63 m_newAnimations.append(newAnimation);
64 } 64 }
65 // Returns whether player has been cancelled and should be filtered during s tyle application. 65 // Returns whether player has been cancelled and should be filtered during s tyle application.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer> > m_cancelledAni mationPlayers; 154 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer> > m_cancelledAni mationPlayers;
155 Vector<AtomicString> m_animationsWithPauseToggled; 155 Vector<AtomicString> m_animationsWithPauseToggled;
156 156
157 NewTransitionMap m_newTransitions; 157 NewTransitionMap m_newTransitions;
158 HashSet<CSSPropertyID> m_cancelledTransitions; 158 HashSet<CSSPropertyID> m_cancelledTransitions;
159 159
160 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activ eInterpolationsForAnimations; 160 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activ eInterpolationsForAnimations;
161 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activ eInterpolationsForTransitions; 161 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_activ eInterpolationsForTransitions;
162 }; 162 };
163 163
164 class CSSAnimations FINAL { 164 class CSSAnimations final {
165 WTF_MAKE_NONCOPYABLE(CSSAnimations); 165 WTF_MAKE_NONCOPYABLE(CSSAnimations);
166 DISALLOW_ALLOCATION(); 166 DISALLOW_ALLOCATION();
167 public: 167 public:
168 CSSAnimations(); 168 CSSAnimations();
169 169
170 // FIXME: This method is only used here and in the legacy animations 170 // FIXME: This method is only used here and in the legacy animations
171 // implementation. It should be made private or file-scope when the legacy 171 // implementation. It should be made private or file-scope when the legacy
172 // engine is removed. 172 // engine is removed.
173 static const StyleRuleKeyframes* matchScopedKeyframesRule(StyleResolver*, co nst Element*, const StringImpl*); 173 static const StyleRuleKeyframes* matchScopedKeyframesRule(StyleResolver*, co nst Element*, const StringImpl*);
174 174
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_previ ousActiveInterpolationsForAnimations; 211 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > m_previ ousActiveInterpolationsForAnimations;
212 212
213 static void calculateAnimationUpdate(CSSAnimationUpdate*, const Element* ani matingElement, Element&, const RenderStyle&, RenderStyle* parentStyle, StyleReso lver*); 213 static void calculateAnimationUpdate(CSSAnimationUpdate*, const Element* ani matingElement, Element&, const RenderStyle&, RenderStyle* parentStyle, StyleReso lver*);
214 static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element* an imatingElement, const RenderStyle&); 214 static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element* an imatingElement, const RenderStyle&);
215 static void calculateTransitionUpdateForProperty(CSSPropertyID, CSSPropertyI D eventId, const CSSTransitionData&, size_t transitionIndex, const RenderStyle& oldStyle, const RenderStyle&, const TransitionMap* activeTransitions, CSSAnimati onUpdate*, const Element*); 215 static void calculateTransitionUpdateForProperty(CSSPropertyID, CSSPropertyI D eventId, const CSSTransitionData&, size_t transitionIndex, const RenderStyle& oldStyle, const RenderStyle&, const TransitionMap* activeTransitions, CSSAnimati onUpdate*, const Element*);
216 216
217 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate*, cons t Element* animatingElement, double timelineCurrentTime); 217 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate*, cons t Element* animatingElement, double timelineCurrentTime);
218 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate*, con st Element* animatingElement, double timelineCurrentTime); 218 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate*, con st Element* animatingElement, double timelineCurrentTime);
219 219
220 class AnimationEventDelegate FINAL : public AnimationNode::EventDelegate { 220 class AnimationEventDelegate final : public AnimationNode::EventDelegate {
221 public: 221 public:
222 AnimationEventDelegate(Element* target, const AtomicString& name) 222 AnimationEventDelegate(Element* target, const AtomicString& name)
223 : m_target(target) 223 : m_target(target)
224 , m_name(name) 224 , m_name(name)
225 , m_previousPhase(AnimationNode::PhaseNone) 225 , m_previousPhase(AnimationNode::PhaseNone)
226 , m_previousIteration(nullValue()) 226 , m_previousIteration(nullValue())
227 { 227 {
228 } 228 }
229 virtual void onEventCondition(const AnimationNode*) OVERRIDE; 229 virtual void onEventCondition(const AnimationNode*) override;
230 virtual void trace(Visitor*) OVERRIDE; 230 virtual void trace(Visitor*) override;
231 231
232 private: 232 private:
233 void maybeDispatch(Document::ListenerType, const AtomicString& eventName , double elapsedTime); 233 void maybeDispatch(Document::ListenerType, const AtomicString& eventName , double elapsedTime);
234 RawPtrWillBeMember<Element> m_target; 234 RawPtrWillBeMember<Element> m_target;
235 const AtomicString m_name; 235 const AtomicString m_name;
236 AnimationNode::Phase m_previousPhase; 236 AnimationNode::Phase m_previousPhase;
237 double m_previousIteration; 237 double m_previousIteration;
238 }; 238 };
239 239
240 class TransitionEventDelegate FINAL : public AnimationNode::EventDelegate { 240 class TransitionEventDelegate final : public AnimationNode::EventDelegate {
241 public: 241 public:
242 TransitionEventDelegate(Element* target, CSSPropertyID property) 242 TransitionEventDelegate(Element* target, CSSPropertyID property)
243 : m_target(target) 243 : m_target(target)
244 , m_property(property) 244 , m_property(property)
245 , m_previousPhase(AnimationNode::PhaseNone) 245 , m_previousPhase(AnimationNode::PhaseNone)
246 { 246 {
247 } 247 }
248 virtual void onEventCondition(const AnimationNode*) OVERRIDE; 248 virtual void onEventCondition(const AnimationNode*) override;
249 virtual void trace(Visitor*) OVERRIDE; 249 virtual void trace(Visitor*) override;
250 250
251 private: 251 private:
252 RawPtrWillBeMember<Element> m_target; 252 RawPtrWillBeMember<Element> m_target;
253 const CSSPropertyID m_property; 253 const CSSPropertyID m_property;
254 AnimationNode::Phase m_previousPhase; 254 AnimationNode::Phase m_previousPhase;
255 }; 255 };
256 }; 256 };
257 257
258 } // namespace blink 258 } // namespace blink
259 259
260 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); 260 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation);
261 261
262 #endif 262 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimationData.h ('k') | Source/core/animation/css/CSSTransitionData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698