| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/animation/Animation.h" | 31 #include "core/animation/Animation.h" |
| 32 | 32 |
| 33 #include "core/animation/AnimationTimeline.h" | 33 #include "core/animation/AnimationTimeline.h" |
| 34 #include "core/animation/CompositorPendingAnimations.h" | 34 #include "core/animation/CompositorPendingAnimations.h" |
| 35 #include "core/animation/KeyframeEffect.h" | 35 #include "core/animation/KeyframeEffect.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
| 38 #include "core/dom/StyleChangeReason.h" |
| 38 #include "core/events/AnimationPlayerEvent.h" | 39 #include "core/events/AnimationPlayerEvent.h" |
| 39 #include "core/frame/UseCounter.h" | 40 #include "core/frame/UseCounter.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 41 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/inspector/InspectorTraceEvents.h" | 42 #include "core/inspector/InspectorTraceEvents.h" |
| 42 #include "platform/RuntimeEnabledFeatures.h" | 43 #include "platform/RuntimeEnabledFeatures.h" |
| 43 #include "platform/TraceEvent.h" | 44 #include "platform/TraceEvent.h" |
| 44 #include "platform/animation/CompositorAnimationPlayer.h" | 45 #include "platform/animation/CompositorAnimationPlayer.h" |
| 45 #include "public/platform/Platform.h" | 46 #include "public/platform/Platform.h" |
| 46 #include "public/platform/WebCompositorSupport.h" | 47 #include "public/platform/WebCompositorSupport.h" |
| 47 #include "wtf/MathExtras.h" | 48 #include "wtf/MathExtras.h" |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 if (suppressed) | 1073 if (suppressed) |
| 1073 cancelAnimationOnCompositor(); | 1074 cancelAnimationOnCompositor(); |
| 1074 } | 1075 } |
| 1075 | 1076 |
| 1076 void Animation::disableCompositedAnimationForTesting() | 1077 void Animation::disableCompositedAnimationForTesting() |
| 1077 { | 1078 { |
| 1078 m_isCompositedAnimationDisabledForTesting = true; | 1079 m_isCompositedAnimationDisabledForTesting = true; |
| 1079 cancelAnimationOnCompositor(); | 1080 cancelAnimationOnCompositor(); |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1083 void Animation::invalidateKeyframeEffect() |
| 1084 { |
| 1085 if (!m_content || !m_content->isKeyframeEffect()) |
| 1086 return; |
| 1087 |
| 1088 toKeyframeEffect(m_content.get())->target()->setNeedsStyleRecalc(LocalStyleC
hange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange))
; |
| 1089 } |
| 1090 |
| 1082 DEFINE_TRACE(Animation) | 1091 DEFINE_TRACE(Animation) |
| 1083 { | 1092 { |
| 1084 visitor->trace(m_content); | 1093 visitor->trace(m_content); |
| 1085 visitor->trace(m_timeline); | 1094 visitor->trace(m_timeline); |
| 1086 visitor->trace(m_pendingFinishedEvent); | 1095 visitor->trace(m_pendingFinishedEvent); |
| 1087 visitor->trace(m_pendingCancelledEvent); | 1096 visitor->trace(m_pendingCancelledEvent); |
| 1088 visitor->trace(m_finishedPromise); | 1097 visitor->trace(m_finishedPromise); |
| 1089 visitor->trace(m_readyPromise); | 1098 visitor->trace(m_readyPromise); |
| 1090 EventTargetWithInlineData::trace(visitor); | 1099 EventTargetWithInlineData::trace(visitor); |
| 1091 ActiveDOMObject::trace(visitor); | 1100 ActiveDOMObject::trace(visitor); |
| 1092 } | 1101 } |
| 1093 | 1102 |
| 1094 } // namespace blink | 1103 } // namespace blink |
| OLD | NEW |