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

Side by Side Diff: Source/core/frame/animation/ImplicitAnimation.h

Issue 134043004: Update page & frame classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/frame/SuspendableTimer.h ('k') | Source/core/frame/animation/KeyframeAnimation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 19 matching lines...) Expand all
30 #define ImplicitAnimation_h 30 #define ImplicitAnimation_h
31 31
32 #include "CSSPropertyNames.h" 32 #include "CSSPropertyNames.h"
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/frame/animation/AnimationBase.h" 34 #include "core/frame/animation/AnimationBase.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 // An ImplicitAnimation tracks the state of a transition of a specific CSS prope rty 38 // An ImplicitAnimation tracks the state of a transition of a specific CSS prope rty
39 // for a single RenderObject. 39 // for a single RenderObject.
40 class ImplicitAnimation : public AnimationBase { 40 class ImplicitAnimation FINAL : public AnimationBase {
41 public: 41 public:
42 static PassRefPtr<ImplicitAnimation> create(const CSSAnimationData* animatio n, CSSPropertyID animatingProperty, RenderObject& renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle) 42 static PassRefPtr<ImplicitAnimation> create(const CSSAnimationData* animatio n, CSSPropertyID animatingProperty, RenderObject& renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle)
43 { 43 {
44 return adoptRef(new ImplicitAnimation(animation, animatingProperty, rend erer, compositeAnimation, fromStyle)); 44 return adoptRef(new ImplicitAnimation(animation, animatingProperty, rend erer, compositeAnimation, fromStyle));
45 }; 45 };
46 46
47 CSSPropertyID transitionProperty() const { return m_transitionProperty; } 47 CSSPropertyID transitionProperty() const { return m_transitionProperty; }
48 CSSPropertyID animatingProperty() const { return m_animatingProperty; } 48 CSSPropertyID animatingProperty() const { return m_animatingProperty; }
49 49
50 virtual void onAnimationEnd(double elapsedTime); 50 virtual void onAnimationEnd(double elapsedTime) OVERRIDE;
51 virtual void startAnimation(double timeOffset); 51 virtual void startAnimation(double timeOffset) OVERRIDE;
52 virtual void pauseAnimation(double /*timeOffset*/); 52 virtual void pauseAnimation(double /*timeOffset*/) OVERRIDE;
53 virtual void endAnimation(); 53 virtual void endAnimation() OVERRIDE;
54 54
55 virtual void animate(CompositeAnimation*, RenderObject*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle); 55 virtual void animate(CompositeAnimation*, RenderObject*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle) OVER RIDE;
56 virtual void getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle); 56 virtual void getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle) OVERRIDE;
57 virtual void reset(RenderStyle* to); 57 void reset(RenderStyle* to);
58 58
59 void setOverridden(bool); 59 void setOverridden(bool);
60 virtual bool overridden() const { return m_overridden; } 60 virtual bool overridden() const OVERRIDE { return m_overridden; }
61 61
62 virtual bool affectsProperty(CSSPropertyID) const; 62 virtual bool affectsProperty(CSSPropertyID) const OVERRIDE;
63 63
64 bool hasStyle() const { return m_fromStyle && m_toStyle; } 64 bool hasStyle() const { return m_fromStyle && m_toStyle; }
65 65
66 bool isTargetPropertyEqual(CSSPropertyID, const RenderStyle*); 66 bool isTargetPropertyEqual(CSSPropertyID, const RenderStyle*);
67 67
68 void blendPropertyValueInStyle(CSSPropertyID, RenderStyle*); 68 void blendPropertyValueInStyle(CSSPropertyID, RenderStyle*);
69 69
70 virtual double timeToNextService(); 70 virtual double timeToNextService() OVERRIDE;
71 71
72 bool active() const { return m_active; } 72 bool active() const { return m_active; }
73 void setActive(bool b) { m_active = b; } 73 void setActive(bool b) { m_active = b; }
74 74
75 protected: 75 protected:
76 bool shouldSendEventForListener(Document::ListenerType) const; 76 bool shouldSendEventForListener(Document::ListenerType) const;
77 bool sendTransitionEvent(const AtomicString&, double elapsedTime); 77 bool sendTransitionEvent(const AtomicString&, double elapsedTime);
78 78
79 void validateTransformFunctionList(); 79 void validateTransformFunctionList();
80 void checkForMatchingFilterFunctionLists(); 80 void checkForMatchingFilterFunctionLists();
81 81
82 private: 82 private:
83 ImplicitAnimation(const CSSAnimationData*, CSSPropertyID, RenderObject&, Com positeAnimation*, RenderStyle*); 83 ImplicitAnimation(const CSSAnimationData*, CSSPropertyID, RenderObject&, Com positeAnimation*, RenderStyle*);
84 virtual ~ImplicitAnimation(); 84 virtual ~ImplicitAnimation();
85 85
86 CSSPropertyID m_transitionProperty; // Transition property as specified in t he RenderStyle. 86 CSSPropertyID m_transitionProperty; // Transition property as specified in t he RenderStyle.
87 CSSPropertyID m_animatingProperty; // Specific property for this ImplicitAni mation 87 CSSPropertyID m_animatingProperty; // Specific property for this ImplicitAni mation
88 bool m_overridden; // true when there is a keyframe animation that overrides the transitioning property 88 bool m_overridden; // true when there is a keyframe animation that overrides the transitioning property
89 bool m_active; // used for culling the list of transitions 89 bool m_active; // used for culling the list of transitions
90 90
91 // The two styles that we are blending. 91 // The two styles that we are blending.
92 RefPtr<RenderStyle> m_fromStyle; 92 RefPtr<RenderStyle> m_fromStyle;
93 RefPtr<RenderStyle> m_toStyle; 93 RefPtr<RenderStyle> m_toStyle;
94 }; 94 };
95 95
96 } // namespace WebCore 96 } // namespace WebCore
97 97
98 #endif // ImplicitAnimation_h 98 #endif // ImplicitAnimation_h
OLDNEW
« no previous file with comments | « Source/core/frame/SuspendableTimer.h ('k') | Source/core/frame/animation/KeyframeAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698