| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/KeyframeEffectReadOnly.h" | 5 #include "core/animation/KeyframeEffectReadOnly.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "core/animation/Animation.h" | 9 #include "core/animation/Animation.h" |
| 10 #include "core/animation/CompositorAnimations.h" | 10 #include "core/animation/CompositorAnimations.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 m_target->setNeedsAnimationStyleRecalc(); | 108 m_target->setNeedsAnimationStyleRecalc(); |
| 109 if (RuntimeEnabledFeatures::webAnimationsSVGEnabled() && | 109 if (RuntimeEnabledFeatures::webAnimationsSVGEnabled() && |
| 110 m_target->isSVGElement()) | 110 m_target->isSVGElement()) |
| 111 toSVGElement(m_target)->setWebAnimationsPending(); | 111 toSVGElement(m_target)->setWebAnimationsPending(); |
| 112 } | 112 } |
| 113 AnimationEffectReadOnly::attach(animation); | 113 AnimationEffectReadOnly::attach(animation); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void KeyframeEffectReadOnly::detach() { | 116 void KeyframeEffectReadOnly::detach() { |
| 117 if (m_target) | 117 if (m_target) |
| 118 m_target->elementAnimations()->animations().remove(animation()); | 118 m_target->elementAnimations()->animations().erase(animation()); |
| 119 if (m_sampledEffect) | 119 if (m_sampledEffect) |
| 120 clearEffects(); | 120 clearEffects(); |
| 121 AnimationEffectReadOnly::detach(); | 121 AnimationEffectReadOnly::detach(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void KeyframeEffectReadOnly::specifiedTimingChanged() { | 124 void KeyframeEffectReadOnly::specifiedTimingChanged() { |
| 125 if (animation()) { | 125 if (animation()) { |
| 126 // FIXME: Needs to consider groups when added. | 126 // FIXME: Needs to consider groups when added. |
| 127 DCHECK_EQ(animation()->effect(), this); | 127 DCHECK_EQ(animation()->effect(), this); |
| 128 animation()->setCompositorPending(true); | 128 animation()->setCompositorPending(true); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 DEFINE_TRACE(KeyframeEffectReadOnly) { | 372 DEFINE_TRACE(KeyframeEffectReadOnly) { |
| 373 visitor->trace(m_target); | 373 visitor->trace(m_target); |
| 374 visitor->trace(m_model); | 374 visitor->trace(m_model); |
| 375 visitor->trace(m_sampledEffect); | 375 visitor->trace(m_sampledEffect); |
| 376 AnimationEffectReadOnly::trace(visitor); | 376 AnimationEffectReadOnly::trace(visitor); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |