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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 10 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 WTF_MAKE_NONCOPYABLE(CSSAnimations); 50 WTF_MAKE_NONCOPYABLE(CSSAnimations);
51 DISALLOW_ALLOCATION(); 51 DISALLOW_ALLOCATION();
52 public: 52 public:
53 CSSAnimations(); 53 CSSAnimations();
54 54
55 const AtomicString getAnimationNameForInspector(const AnimationPlayer&); 55 const AtomicString getAnimationNameForInspector(const AnimationPlayer&);
56 bool isTransitionAnimationForInspector(const AnimationPlayer&) const; 56 bool isTransitionAnimationForInspector(const AnimationPlayer&) const;
57 57
58 static const StylePropertyShorthand& animatableProperties(); 58 static const StylePropertyShorthand& animatableProperties();
59 static bool isAllowedAnimation(CSSPropertyID); 59 static bool isAllowedAnimation(CSSPropertyID);
60 static PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> calculateUpdate(const Elem ent* animatingElement, Element&, const RenderStyle&, RenderStyle* parentStyle, S tyleResolver*); 60 static PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> calculateUpdate(const Elem ent* animatingElement, Element&, const RenderStyle&, const RenderStyle* parentSt yle, StyleResolver*);
61 61
62 void setPendingUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> update) { m _pendingUpdate = update; } 62 void setPendingUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> update) { m _pendingUpdate = update; }
63 void maybeApplyPendingUpdate(Element*); 63 void maybeApplyPendingUpdate(Element*);
64 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } 64 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; }
65 void cancel(); 65 void cancel();
66 66
67 void trace(Visitor*); 67 void trace(Visitor*);
68 68
69 private: 69 private:
70 struct RunningTransition { 70 struct RunningTransition {
(...skipping 14 matching lines...) Expand all
85 using AnimationMap = WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<Anim ationPlayer>>; 85 using AnimationMap = WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<Anim ationPlayer>>;
86 AnimationMap m_animations; 86 AnimationMap m_animations;
87 87
88 using TransitionMap = WillBeHeapHashMap<CSSPropertyID, RunningTransition>; 88 using TransitionMap = WillBeHeapHashMap<CSSPropertyID, RunningTransition>;
89 TransitionMap m_transitions; 89 TransitionMap m_transitions;
90 90
91 OwnPtrWillBeMember<CSSAnimationUpdate> m_pendingUpdate; 91 OwnPtrWillBeMember<CSSAnimationUpdate> m_pendingUpdate;
92 92
93 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_previo usActiveInterpolationsForAnimations; 93 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_previo usActiveInterpolationsForAnimations;
94 94
95 static void calculateAnimationUpdate(CSSAnimationUpdate*, const Element* ani matingElement, Element&, const RenderStyle&, RenderStyle* parentStyle, StyleReso lver*); 95 static void calculateAnimationUpdate(CSSAnimationUpdate*, const Element* ani matingElement, Element&, const RenderStyle&, const RenderStyle* parentStyle, Sty leResolver*);
96 static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element* an imatingElement, const RenderStyle&); 96 static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element* an imatingElement, const RenderStyle&);
97 static void calculateTransitionUpdateForProperty(CSSPropertyID, CSSPropertyI D eventId, const CSSTransitionData&, size_t transitionIndex, const RenderStyle& oldStyle, const RenderStyle&, const TransitionMap* activeTransitions, CSSAnimati onUpdate*, const Element*); 97 static void calculateTransitionUpdateForProperty(CSSPropertyID, CSSPropertyI D eventId, const CSSTransitionData&, size_t transitionIndex, const RenderStyle& oldStyle, const RenderStyle&, const TransitionMap* activeTransitions, CSSAnimati onUpdate*, const Element*);
98 98
99 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate*, cons t Element* animatingElement, double timelineCurrentTime); 99 static void calculateAnimationActiveInterpolations(CSSAnimationUpdate*, cons t Element* animatingElement, double timelineCurrentTime);
100 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate*, con st Element* animatingElement, double timelineCurrentTime); 100 static void calculateTransitionActiveInterpolations(CSSAnimationUpdate*, con st Element* animatingElement, double timelineCurrentTime);
101 101
102 class AnimationEventDelegate final : public AnimationNode::EventDelegate { 102 class AnimationEventDelegate final : public AnimationNode::EventDelegate {
103 public: 103 public:
104 AnimationEventDelegate(Element* target, const AtomicString& name) 104 AnimationEventDelegate(Element* target, const AtomicString& name)
105 : m_target(target) 105 : m_target(target)
(...skipping 29 matching lines...) Expand all
135 private: 135 private:
136 RawPtrWillBeMember<Element> m_target; 136 RawPtrWillBeMember<Element> m_target;
137 const CSSPropertyID m_property; 137 const CSSPropertyID m_property;
138 AnimationNode::Phase m_previousPhase; 138 AnimationNode::Phase m_previousPhase;
139 }; 139 };
140 }; 140 };
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif 144 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698