| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class StylePropertyShorthand; | 49 class StylePropertyShorthand; |
| 50 class StyleResolver; | 50 class StyleResolver; |
| 51 class StyleRuleKeyframes; | 51 class StyleRuleKeyframes; |
| 52 | 52 |
| 53 // This class stores the CSS Animations/Transitions information we use during a
style recalc. | 53 // This class stores the CSS Animations/Transitions information we use during a
style recalc. |
| 54 // This includes updates to animations/transitions as well as the Interpolations
to be applied. | 54 // This includes updates to animations/transitions as well as the Interpolations
to be applied. |
| 55 class CSSAnimationUpdate FINAL : public NoBaseWillBeGarbageCollectedFinalized<CS
SAnimationUpdate> { | 55 class CSSAnimationUpdate FINAL : public NoBaseWillBeGarbageCollectedFinalized<CS
SAnimationUpdate> { |
| 56 public: | 56 public: |
| 57 void startAnimation(AtomicString& animationName, PassRefPtrWillBeRawPtr<Iner
tAnimation> animation) | 57 void startAnimation(AtomicString& animationName, PassRefPtrWillBeRawPtr<Iner
tAnimation> animation) |
| 58 { | 58 { |
| 59 animation->setName(animationName); |
| 59 NewAnimation newAnimation; | 60 NewAnimation newAnimation; |
| 60 newAnimation.name = animationName; | 61 newAnimation.name = animationName; |
| 61 newAnimation.animation = animation; | 62 newAnimation.animation = animation; |
| 62 m_newAnimations.append(newAnimation); | 63 m_newAnimations.append(newAnimation); |
| 63 } | 64 } |
| 64 // Returns whether player has been cancelled and should be filtered during s
tyle application. | 65 // Returns whether player has been cancelled and should be filtered during s
tyle application. |
| 65 bool isCancelledAnimation(const AnimationPlayer* player) const { return m_ca
ncelledAnimationPlayers.contains(player); } | 66 bool isCancelledAnimation(const AnimationPlayer* player) const { return m_ca
ncelledAnimationPlayers.contains(player); } |
| 66 void cancelAnimation(const AtomicString& name, AnimationPlayer& player) | 67 void cancelAnimation(const AtomicString& name, AnimationPlayer& player) |
| 67 { | 68 { |
| 68 m_cancelledAnimationNames.append(name); | 69 m_cancelledAnimationNames.append(name); |
| 69 m_cancelledAnimationPlayers.add(&player); | 70 m_cancelledAnimationPlayers.add(&player); |
| 70 } | 71 } |
| 71 void toggleAnimationPaused(const AtomicString& name) | 72 void toggleAnimationPaused(const AtomicString& name) |
| 72 { | 73 { |
| 73 m_animationsWithPauseToggled.append(name); | 74 m_animationsWithPauseToggled.append(name); |
| 74 } | 75 } |
| 75 | 76 |
| 76 void startTransition(CSSPropertyID id, CSSPropertyID eventId, const Animatab
leValue* from, const AnimatableValue* to, PassRefPtrWillBeRawPtr<InertAnimation>
animation) | 77 void startTransition(CSSPropertyID id, CSSPropertyID eventId, const Animatab
leValue* from, const AnimatableValue* to, PassRefPtrWillBeRawPtr<InertAnimation>
animation) |
| 77 { | 78 { |
| 79 animation->setName(getPropertyName(id)); |
| 78 NewTransition newTransition; | 80 NewTransition newTransition; |
| 79 newTransition.id = id; | 81 newTransition.id = id; |
| 80 newTransition.eventId = eventId; | 82 newTransition.eventId = eventId; |
| 81 newTransition.from = from; | 83 newTransition.from = from; |
| 82 newTransition.to = to; | 84 newTransition.to = to; |
| 83 newTransition.animation = animation; | 85 newTransition.animation = animation; |
| 84 m_newTransitions.set(id, newTransition); | 86 m_newTransitions.set(id, newTransition); |
| 85 } | 87 } |
| 86 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans
itions.contains(id); } | 88 bool isCancelledTransition(CSSPropertyID id) const { return m_cancelledTrans
itions.contains(id); } |
| 87 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); } | 89 void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 const CSSPropertyID m_property; | 253 const CSSPropertyID m_property; |
| 252 AnimationNode::Phase m_previousPhase; | 254 AnimationNode::Phase m_previousPhase; |
| 253 }; | 255 }; |
| 254 }; | 256 }; |
| 255 | 257 |
| 256 } // namespace blink | 258 } // namespace blink |
| 257 | 259 |
| 258 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); | 260 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); |
| 259 | 261 |
| 260 #endif | 262 #endif |
| OLD | NEW |