| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/inspector/InspectorAnimationAgent.h" | 5 #include "core/inspector/InspectorAnimationAgent.h" |
| 6 | 6 |
| 7 #include "core/animation/Animation.h" | 7 #include "core/animation/Animation.h" |
| 8 #include "core/animation/AnimationEffectReadOnly.h" | 8 #include "core/animation/AnimationEffectReadOnly.h" |
| 9 #include "core/animation/AnimationEffectTiming.h" | 9 #include "core/animation/AnimationEffectTiming.h" |
| 10 #include "core/animation/ComputedTimingProperties.h" | 10 #include "core/animation/ComputedTimingProperties.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 Response InspectorAnimationAgent::releaseAnimations( | 340 Response InspectorAnimationAgent::releaseAnimations( |
| 341 std::unique_ptr<protocol::Array<String>> animationIds) { | 341 std::unique_ptr<protocol::Array<String>> animationIds) { |
| 342 for (size_t i = 0; i < animationIds->length(); ++i) { | 342 for (size_t i = 0; i < animationIds->length(); ++i) { |
| 343 String animationId = animationIds->get(i); | 343 String animationId = animationIds->get(i); |
| 344 blink::Animation* animation = m_idToAnimation.get(animationId); | 344 blink::Animation* animation = m_idToAnimation.get(animationId); |
| 345 if (animation) | 345 if (animation) |
| 346 animation->setEffectSuppressed(false); | 346 animation->setEffectSuppressed(false); |
| 347 blink::Animation* clone = m_idToAnimationClone.get(animationId); | 347 blink::Animation* clone = m_idToAnimationClone.get(animationId); |
| 348 if (clone) | 348 if (clone) |
| 349 clone->cancel(); | 349 clone->cancel(); |
| 350 m_idToAnimationClone.remove(animationId); | 350 m_idToAnimationClone.erase(animationId); |
| 351 m_idToAnimation.remove(animationId); | 351 m_idToAnimation.erase(animationId); |
| 352 m_idToAnimationType.remove(animationId); | 352 m_idToAnimationType.erase(animationId); |
| 353 m_clearedAnimations.insert(animationId); | 353 m_clearedAnimations.insert(animationId); |
| 354 } | 354 } |
| 355 return Response::OK(); | 355 return Response::OK(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 Response InspectorAnimationAgent::setTiming(const String& animationId, | 358 Response InspectorAnimationAgent::setTiming(const String& animationId, |
| 359 double duration, | 359 double duration, |
| 360 double delay) { | 360 double delay) { |
| 361 blink::Animation* animation = nullptr; | 361 blink::Animation* animation = nullptr; |
| 362 Response response = assertAnimation(animationId, animation); | 362 Response response = assertAnimation(animationId, animation); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 550 |
| 551 DEFINE_TRACE(InspectorAnimationAgent) { | 551 DEFINE_TRACE(InspectorAnimationAgent) { |
| 552 visitor->trace(m_inspectedFrames); | 552 visitor->trace(m_inspectedFrames); |
| 553 visitor->trace(m_cssAgent); | 553 visitor->trace(m_cssAgent); |
| 554 visitor->trace(m_idToAnimation); | 554 visitor->trace(m_idToAnimation); |
| 555 visitor->trace(m_idToAnimationClone); | 555 visitor->trace(m_idToAnimationClone); |
| 556 InspectorBaseAgent::trace(visitor); | 556 InspectorBaseAgent::trace(visitor); |
| 557 } | 557 } |
| 558 | 558 |
| 559 } // namespace blink | 559 } // namespace blink |
| OLD | NEW |