Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 }; | 112 }; |
| 113 const Vector<NewTransition>& newTransitions() const { return m_newTransition s; } | 113 const Vector<NewTransition>& newTransitions() const { return m_newTransition s; } |
| 114 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; } | 114 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; } |
| 115 | 115 |
| 116 void adoptCompositableValuesForAnimations(AnimationEffect::CompositableValue Map& newMap) { newMap.swap(m_compositableValuesForAnimations); } | 116 void adoptCompositableValuesForAnimations(AnimationEffect::CompositableValue Map& newMap) { newMap.swap(m_compositableValuesForAnimations); } |
| 117 void adoptCompositableValuesForTransitions(AnimationEffect::CompositableValu eMap& newMap) { newMap.swap(m_compositableValuesForTransitions); } | 117 void adoptCompositableValuesForTransitions(AnimationEffect::CompositableValu eMap& newMap) { newMap.swap(m_compositableValuesForTransitions); } |
| 118 const AnimationEffect::CompositableValueMap& compositableValuesForAnimations () const { return m_compositableValuesForAnimations; } | 118 const AnimationEffect::CompositableValueMap& compositableValuesForAnimations () const { return m_compositableValuesForAnimations; } |
| 119 const AnimationEffect::CompositableValueMap& compositableValuesForTransition s() const { return m_compositableValuesForTransitions; } | 119 const AnimationEffect::CompositableValueMap& compositableValuesForTransition s() const { return m_compositableValuesForTransitions; } |
| 120 AnimationEffect::CompositableValueMap& compositableValuesForAnimations() { r eturn m_compositableValuesForAnimations; } | 120 AnimationEffect::CompositableValueMap& compositableValuesForAnimations() { r eturn m_compositableValuesForAnimations; } |
| 121 | 121 |
| 122 bool hasPendingCandidatesForCompositorAnimation() const; | |
|
Steve Block
2013/11/18 05:03:03
Where is this used?
dstockwell
2013/11/18 06:11:20
Removed.
| |
| 123 | |
| 122 bool isEmpty() const | 124 bool isEmpty() const |
| 123 { | 125 { |
| 124 return m_newAnimations.isEmpty() | 126 return m_newAnimations.isEmpty() |
| 125 && m_cancelledAnimationNames.isEmpty() | 127 && m_cancelledAnimationNames.isEmpty() |
| 126 && m_cancelledAnimationPlayers.isEmpty() | 128 && m_cancelledAnimationPlayers.isEmpty() |
| 127 && m_animationsWithPauseToggled.isEmpty() | 129 && m_animationsWithPauseToggled.isEmpty() |
| 128 && m_newTransitions.isEmpty() | 130 && m_newTransitions.isEmpty() |
| 129 && m_cancelledTransitions.isEmpty() | 131 && m_cancelledTransitions.isEmpty() |
| 130 && m_compositableValuesForAnimations.isEmpty() | 132 && m_compositableValuesForAnimations.isEmpty() |
| 131 && m_compositableValuesForTransitions.isEmpty(); | 133 && m_compositableValuesForTransitions.isEmpty(); |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 157 static bool isAnimatableProperty(CSSPropertyID); | 159 static bool isAnimatableProperty(CSSPropertyID); |
| 158 static const StylePropertyShorthand& animatableProperties(); | 160 static const StylePropertyShorthand& animatableProperties(); |
| 159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r. | 161 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r. |
| 160 // We should also change the Element* to a const Element* | 162 // We should also change the Element* to a const Element* |
| 161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*); | 163 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*); |
| 162 | 164 |
| 163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; } | 165 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; } |
| 164 void maybeApplyPendingUpdate(Element*); | 166 void maybeApplyPendingUpdate(Element*); |
| 165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } | 167 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } |
| 166 void cancel(); | 168 void cancel(); |
| 169 | |
| 170 bool hasPendingCandidateWhichShouldComposite(bool inCompositingMode) const; | |
|
Steve Block
2013/11/18 05:03:03
Can you rename the param to make clear what's in c
dstockwell
2013/11/18 06:11:20
Done.
| |
| 171 | |
| 167 private: | 172 private: |
| 168 // Note that a single animation name may map to multiple players due to | 173 // Note that a single animation name may map to multiple players due to |
| 169 // the way in which we split up animations with incomplete keyframes. | 174 // the way in which we split up animations with incomplete keyframes. |
| 170 // FIXME: Once the Web Animations model supports groups, we could use a | 175 // FIXME: Once the Web Animations model supports groups, we could use a |
| 171 // ParGroup to drive multiple animations from a single Player. | 176 // ParGroup to drive multiple animations from a single Player. |
| 172 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; | 177 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; |
| 173 struct RunningTransition { | 178 struct RunningTransition { |
| 174 Animation* transition; // The TransitionTimeline keeps the Players alive | 179 Animation* transition; // The TransitionTimeline keeps the Players alive |
| 175 const AnimatableValue* from; | 180 const AnimatableValue* from; |
| 176 const AnimatableValue* to; | 181 const AnimatableValue* to; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; | 218 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; |
| 214 private: | 219 private: |
| 215 Element* m_target; | 220 Element* m_target; |
| 216 const CSSPropertyID m_property; | 221 const CSSPropertyID m_property; |
| 217 }; | 222 }; |
| 218 }; | 223 }; |
| 219 | 224 |
| 220 } // namespace WebCore | 225 } // namespace WebCore |
| 221 | 226 |
| 222 #endif | 227 #endif |
| OLD | NEW |