| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 static bool isAnimatableProperty(CSSPropertyID); | 157 static bool isAnimatableProperty(CSSPropertyID); |
| 158 static const StylePropertyShorthand& animatableProperties(); | 158 static const StylePropertyShorthand& animatableProperties(); |
| 159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve
r. | 159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve
r. |
| 160 // We should also change the Element* to a const Element* | 160 // We should also change the Element* to a const Element* |
| 161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render
Style&, StyleResolver*); | 161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render
Style&, StyleResolver*); |
| 162 | 162 |
| 163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda
te = update; } | 163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda
te = update; } |
| 164 void maybeApplyPendingUpdate(Element*); | 164 void maybeApplyPendingUpdate(Element*); |
| 165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt
y() && !m_pendingUpdate; } | 165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt
y() && !m_pendingUpdate; } |
| 166 void cancel(); | 166 void cancel(); |
| 167 |
| 168 bool shouldCompositeForPendingAnimations(bool renderViewInCompositingMode) c
onst; |
| 169 |
| 167 private: | 170 private: |
| 168 // Note that a single animation name may map to multiple players due to | 171 // 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. | 172 // the way in which we split up animations with incomplete keyframes. |
| 170 // FIXME: Once the Web Animations model supports groups, we could use a | 173 // FIXME: Once the Web Animations model supports groups, we could use a |
| 171 // ParGroup to drive multiple animations from a single Player. | 174 // ParGroup to drive multiple animations from a single Player. |
| 172 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; | 175 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; |
| 173 struct RunningTransition { | 176 struct RunningTransition { |
| 174 Animation* transition; // The TransitionTimeline keeps the Players alive | 177 Animation* transition; // The TransitionTimeline keeps the Players alive |
| 175 const AnimatableValue* from; | 178 const AnimatableValue* from; |
| 176 const AnimatableValue* to; | 179 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; | 216 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time
dItem::Phase previousPhase, double previousIteration) OVERRIDE; |
| 214 private: | 217 private: |
| 215 Element* m_target; | 218 Element* m_target; |
| 216 const CSSPropertyID m_property; | 219 const CSSPropertyID m_property; |
| 217 }; | 220 }; |
| 218 }; | 221 }; |
| 219 | 222 |
| 220 } // namespace WebCore | 223 } // namespace WebCore |
| 221 | 224 |
| 222 #endif | 225 #endif |
| OLD | NEW |