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

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

Issue 57643004: Pass RenderStyle / RenderObject by reference in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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) 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 static PassRefPtr<CompositeAnimation> create(AnimationControllerPrivate* ani mationController) 47 static PassRefPtr<CompositeAnimation> create(AnimationControllerPrivate* ani mationController)
48 { 48 {
49 return adoptRef(new CompositeAnimation(animationController)); 49 return adoptRef(new CompositeAnimation(animationController));
50 }; 50 };
51 51
52 ~CompositeAnimation(); 52 ~CompositeAnimation();
53 53
54 void clearRenderer(); 54 void clearRenderer();
55 55
56 PassRefPtr<RenderStyle> animate(RenderObject*, RenderStyle* currentStyle, Re nderStyle* targetStyle); 56 PassRefPtr<RenderStyle> animate(RenderObject&, RenderStyle* currentStyle, Re nderStyle& targetStyle);
57 PassRefPtr<RenderStyle> getAnimatedStyle() const; 57 PassRefPtr<RenderStyle> getAnimatedStyle() const;
58 58
59 double timeToNextService() const; 59 double timeToNextService() const;
60 double timeToNextEvent() const; 60 double timeToNextEvent() const;
61 61
62 AnimationControllerPrivate* animationController() const { return m_animation Controller; } 62 AnimationControllerPrivate* animationController() const { return m_animation Controller; }
63 63
64 bool hasAnimations() const { return !m_transitions.isEmpty() || !m_keyframe Animations.isEmpty(); } 64 bool hasAnimations() const { return !m_transitions.isEmpty() || !m_keyframe Animations.isEmpty(); }
65 65
66 bool isAnimatingProperty(CSSPropertyID, bool acceleratedOnly, bool isRunning Now) const; 66 bool isAnimatingProperty(CSSPropertyID, bool acceleratedOnly, bool isRunning Now) const;
67 67
68 PassRefPtr<KeyframeAnimation> getAnimationForProperty(CSSPropertyID) const; 68 PassRefPtr<KeyframeAnimation> getAnimationForProperty(CSSPropertyID) const;
69 69
70 void overrideImplicitAnimations(CSSPropertyID); 70 void overrideImplicitAnimations(CSSPropertyID);
71 void resumeOverriddenImplicitAnimations(CSSPropertyID); 71 void resumeOverriddenImplicitAnimations(CSSPropertyID);
72 72
73 void pauseAnimationsForTesting(double t); 73 void pauseAnimationsForTesting(double t);
74 unsigned numberOfActiveAnimations() const; 74 unsigned numberOfActiveAnimations() const;
75 75
76 private: 76 private:
77 CompositeAnimation(AnimationControllerPrivate* animationController) 77 CompositeAnimation(AnimationControllerPrivate* animationController)
78 : m_animationController(animationController) 78 : m_animationController(animationController)
79 { 79 {
80 } 80 }
81 81
82 void updateTransitions(RenderObject*, RenderStyle* currentStyle, RenderStyle * targetStyle); 82 void updateTransitions(RenderObject&, RenderStyle* currentStyle, RenderStyle & targetStyle);
83 void updateKeyframeAnimations(RenderObject*, RenderStyle* currentStyle, Rend erStyle* targetStyle); 83 void updateKeyframeAnimations(RenderObject&, RenderStyle* currentStyle, Rend erStyle& targetStyle);
84 84
85 typedef HashMap<int, RefPtr<ImplicitAnimation> > CSSPropertyTransitionsMap; 85 typedef HashMap<int, RefPtr<ImplicitAnimation> > CSSPropertyTransitionsMap;
86 typedef HashMap<AtomicString, RefPtr<KeyframeAnimation> > AnimationNameMap; 86 typedef HashMap<AtomicString, RefPtr<KeyframeAnimation> > AnimationNameMap;
87 87
88 AnimationControllerPrivate* m_animationController; 88 AnimationControllerPrivate* m_animationController;
89 CSSPropertyTransitionsMap m_transitions; 89 CSSPropertyTransitionsMap m_transitions;
90 AnimationNameMap m_keyframeAnimations; 90 AnimationNameMap m_keyframeAnimations;
91 Vector<AtomicString> m_keyframeAnimationOrderList; 91 Vector<AtomicString> m_keyframeAnimationOrderList;
92 }; 92 };
93 93
94 } // namespace WebCore 94 } // namespace WebCore
95 95
96 #endif // CompositeAnimation_h 96 #endif // CompositeAnimation_h
OLDNEW
« no previous file with comments | « Source/core/frame/animation/AnimationControllerPrivate.h ('k') | Source/core/frame/animation/CompositeAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698