| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 DEFINE_INLINE_TRACE() | 102 DEFINE_INLINE_TRACE() |
| 103 { | 103 { |
| 104 visitor->trace(animation); | 104 visitor->trace(animation); |
| 105 visitor->trace(styleRule); | 105 visitor->trace(styleRule); |
| 106 } | 106 } |
| 107 | 107 |
| 108 Member<Animation> animation; | 108 Member<Animation> animation; |
| 109 AtomicString name; | 109 AtomicString name; |
| 110 size_t nameIndex; | 110 size_t nameIndex; |
| 111 Timing specifiedTiming; | 111 Timing specifiedTiming; |
| 112 RefPtrWillBeMember<StyleRuleKeyframes> styleRule; | 112 Member<StyleRuleKeyframes> styleRule; |
| 113 unsigned styleRuleVersion; | 113 unsigned styleRuleVersion; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 struct RunningTransition { | 116 struct RunningTransition { |
| 117 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 117 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 118 public: | 118 public: |
| 119 DEFINE_INLINE_TRACE() | 119 DEFINE_INLINE_TRACE() |
| 120 { | 120 { |
| 121 visitor->trace(animation); | 121 visitor->trace(animation); |
| 122 } | 122 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 bool requiresIterationEvents(const AnimationEffect&) override; | 157 bool requiresIterationEvents(const AnimationEffect&) override; |
| 158 void onEventCondition(const AnimationEffect&) override; | 158 void onEventCondition(const AnimationEffect&) override; |
| 159 DECLARE_VIRTUAL_TRACE(); | 159 DECLARE_VIRTUAL_TRACE(); |
| 160 | 160 |
| 161 private: | 161 private: |
| 162 const Element& animationTarget() const { return *m_animationTarget; } | 162 const Element& animationTarget() const { return *m_animationTarget; } |
| 163 EventTarget* eventTarget() const; | 163 EventTarget* eventTarget() const; |
| 164 Document& document() const { return m_animationTarget->document(); } | 164 Document& document() const { return m_animationTarget->document(); } |
| 165 | 165 |
| 166 void maybeDispatch(Document::ListenerType, const AtomicString& eventName
, double elapsedTime); | 166 void maybeDispatch(Document::ListenerType, const AtomicString& eventName
, double elapsedTime); |
| 167 RawPtrWillBeMember<Element> m_animationTarget; | 167 Member<Element> m_animationTarget; |
| 168 const AtomicString m_name; | 168 const AtomicString m_name; |
| 169 AnimationEffect::Phase m_previousPhase; | 169 AnimationEffect::Phase m_previousPhase; |
| 170 double m_previousIteration; | 170 double m_previousIteration; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 class TransitionEventDelegate final : public AnimationEffect::EventDelegate
{ | 173 class TransitionEventDelegate final : public AnimationEffect::EventDelegate
{ |
| 174 public: | 174 public: |
| 175 TransitionEventDelegate(Element* transitionTarget, CSSPropertyID propert
y) | 175 TransitionEventDelegate(Element* transitionTarget, CSSPropertyID propert
y) |
| 176 : m_transitionTarget(transitionTarget) | 176 : m_transitionTarget(transitionTarget) |
| 177 , m_property(property) | 177 , m_property(property) |
| 178 , m_previousPhase(AnimationEffect::PhaseNone) | 178 , m_previousPhase(AnimationEffect::PhaseNone) |
| 179 { | 179 { |
| 180 } | 180 } |
| 181 bool requiresIterationEvents(const AnimationEffect&) override { return f
alse; } | 181 bool requiresIterationEvents(const AnimationEffect&) override { return f
alse; } |
| 182 void onEventCondition(const AnimationEffect&) override; | 182 void onEventCondition(const AnimationEffect&) override; |
| 183 DECLARE_VIRTUAL_TRACE(); | 183 DECLARE_VIRTUAL_TRACE(); |
| 184 | 184 |
| 185 private: | 185 private: |
| 186 const Element& transitionTarget() const { return *m_transitionTarget; } | 186 const Element& transitionTarget() const { return *m_transitionTarget; } |
| 187 EventTarget* eventTarget() const; | 187 EventTarget* eventTarget() const; |
| 188 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId();
} | 188 PseudoId getPseudoId() const { return m_transitionTarget->getPseudoId();
} |
| 189 Document& document() const { return m_transitionTarget->document(); } | 189 Document& document() const { return m_transitionTarget->document(); } |
| 190 | 190 |
| 191 RawPtrWillBeMember<Element> m_transitionTarget; | 191 Member<Element> m_transitionTarget; |
| 192 const CSSPropertyID m_property; | 192 const CSSPropertyID m_property; |
| 193 AnimationEffect::Phase m_previousPhase; | 193 AnimationEffect::Phase m_previousPhase; |
| 194 }; | 194 }; |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace blink | 197 } // namespace blink |
| 198 | 198 |
| 199 #endif | 199 #endif |
| OLD | NEW |