| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 Member<Animation> animation; | 141 Member<Animation> animation; |
| 142 RefPtr<AnimatableValue> from; | 142 RefPtr<AnimatableValue> from; |
| 143 RefPtr<AnimatableValue> to; | 143 RefPtr<AnimatableValue> to; |
| 144 RefPtr<AnimatableValue> reversingAdjustedStartValue; | 144 RefPtr<AnimatableValue> reversingAdjustedStartValue; |
| 145 double reversingShorteningFactor; | 145 double reversingShorteningFactor; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 HeapVector<Member<RunningAnimation>> m_runningAnimations; | 148 HeapVector<Member<RunningAnimation>> m_runningAnimations; |
| 149 | 149 |
| 150 using TransitionMap = HeapHashMap<CSSPropertyID, RunningTransition>; | 150 using TransitionMap = HeapHashMap<PropertyHandle, RunningTransition>; |
| 151 TransitionMap m_transitions; | 151 TransitionMap m_transitions; |
| 152 | 152 |
| 153 CSSAnimationUpdate m_pendingUpdate; | 153 CSSAnimationUpdate m_pendingUpdate; |
| 154 | 154 |
| 155 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations; | 155 ActiveInterpolationsMap m_previousActiveInterpolationsForAnimations; |
| 156 | 156 |
| 157 static void calculateTransitionUpdateForProperty( | 157 static void calculateTransitionUpdateForProperty( |
| 158 CSSPropertyID, | 158 const PropertyHandle&, |
| 159 const CSSTransitionData&, | 159 const CSSTransitionData&, |
| 160 size_t transitionIndex, | 160 size_t transitionIndex, |
| 161 const ComputedStyle& oldStyle, | 161 const ComputedStyle& oldStyle, |
| 162 const ComputedStyle&, | 162 const ComputedStyle&, |
| 163 const TransitionMap* activeTransitions, | 163 const TransitionMap* activeTransitions, |
| 164 CSSAnimationUpdate&, | 164 CSSAnimationUpdate&, |
| 165 const Element*); | 165 const Element*); |
| 166 | 166 |
| 167 static void calculateAnimationActiveInterpolations( | 167 static void calculateAnimationActiveInterpolations( |
| 168 CSSAnimationUpdate&, | 168 CSSAnimationUpdate&, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 193 double elapsedTime); | 193 double elapsedTime); |
| 194 Member<Element> m_animationTarget; | 194 Member<Element> m_animationTarget; |
| 195 const AtomicString m_name; | 195 const AtomicString m_name; |
| 196 AnimationEffectReadOnly::Phase m_previousPhase; | 196 AnimationEffectReadOnly::Phase m_previousPhase; |
| 197 double m_previousIteration; | 197 double m_previousIteration; |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 class TransitionEventDelegate final | 200 class TransitionEventDelegate final |
| 201 : public AnimationEffectReadOnly::EventDelegate { | 201 : public AnimationEffectReadOnly::EventDelegate { |
| 202 public: | 202 public: |
| 203 TransitionEventDelegate(Element* transitionTarget, CSSPropertyID property) | 203 TransitionEventDelegate(Element* transitionTarget, |
| 204 const PropertyHandle& property) |
| 204 : m_transitionTarget(transitionTarget), | 205 : m_transitionTarget(transitionTarget), |
| 205 m_property(property), | 206 m_property(property), |
| 206 m_previousPhase(AnimationEffectReadOnly::PhaseNone) {} | 207 m_previousPhase(AnimationEffectReadOnly::PhaseNone) {} |
| 207 bool requiresIterationEvents(const AnimationEffectReadOnly&) override { | 208 bool requiresIterationEvents(const AnimationEffectReadOnly&) override { |
| 208 return false; | 209 return false; |
| 209 } | 210 } |
| 210 void onEventCondition(const AnimationEffectReadOnly&) override; | 211 void onEventCondition(const AnimationEffectReadOnly&) override; |
| 211 DECLARE_VIRTUAL_TRACE(); | 212 DECLARE_VIRTUAL_TRACE(); |
| 212 | 213 |
| 213 private: | 214 private: |
| 214 const Element& transitionTarget() const { return *m_transitionTarget; } | 215 const Element& transitionTarget() const { return *m_transitionTarget; } |
| 215 EventTarget* eventTarget() const; | 216 EventTarget* eventTarget() const; |
| 216 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId(); } | 217 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId(); } |
| 217 Document& document() const { return m_transitionTarget->document(); } | 218 Document& document() const { return m_transitionTarget->document(); } |
| 218 | 219 |
| 219 Member<Element> m_transitionTarget; | 220 Member<Element> m_transitionTarget; |
| 220 const CSSPropertyID m_property; | 221 PropertyHandle m_property; |
| 221 AnimationEffectReadOnly::Phase m_previousPhase; | 222 AnimationEffectReadOnly::Phase m_previousPhase; |
| 222 }; | 223 }; |
| 223 }; | 224 }; |
| 224 | 225 |
| 225 } // namespace blink | 226 } // namespace blink |
| 226 | 227 |
| 227 #endif | 228 #endif |
| OLD | NEW |