| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/inspector/InspectorTraceEvents.h" | 6 #include "core/inspector/InspectorTraceEvents.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
| 9 #include "core/animation/Animation.h" | 9 #include "core/animation/Animation.h" |
| 10 #include "core/animation/KeyframeEffect.h" | 10 #include "core/animation/KeyframeEffect.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 return value.release(); | 735 return value.release(); |
| 736 } | 736 } |
| 737 | 737 |
| 738 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationEvent::data(c
onst Animation& player) | 738 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationEvent::data(c
onst Animation& player) |
| 739 { | 739 { |
| 740 RefPtr<TracedValue> value = TracedValue::create(); | 740 RefPtr<TracedValue> value = TracedValue::create(); |
| 741 value->setString("id", String::number(player.sequenceNumber())); | 741 value->setString("id", String::number(player.sequenceNumber())); |
| 742 value->setString("state", player.playState()); | 742 value->setString("state", player.playState()); |
| 743 if (const AnimationEffect* effect = player.effect()) { | 743 if (const AnimationEffect* effect = player.effect()) { |
| 744 value->setString("name", effect->name()); | 744 value->setString("name", effect->name()); |
| 745 if (effect->isAnimation()) { | 745 if (effect->isKeyframeEffect()) { |
| 746 if (Element* target = toKeyframeEffect(effect)->target()) | 746 if (Element* target = toKeyframeEffect(effect)->target()) |
| 747 setNodeInfo(value.get(), target, "nodeId", "nodeName"); | 747 setNodeInfo(value.get(), target, "nodeId", "nodeName"); |
| 748 } | 748 } |
| 749 } | 749 } |
| 750 return value.release(); | 750 return value.release(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d
ata(const Animation& player) | 753 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorAnimationStateEvent::d
ata(const Animation& player) |
| 754 { | 754 { |
| 755 RefPtr<TracedValue> value = TracedValue::create(); | 755 RefPtr<TracedValue> value = TracedValue::create(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 771 if (request.move()) | 771 if (request.move()) |
| 772 value->setBoolean("move", true); | 772 value->setBoolean("move", true); |
| 773 if (request.listBased()) | 773 if (request.listBased()) |
| 774 value->setBoolean("listBased", true); | 774 value->setBoolean("listBased", true); |
| 775 else if (Node* node = result.innerNode()) | 775 else if (Node* node = result.innerNode()) |
| 776 setNodeInfo(value.get(), node, "nodeId", "nodeName"); | 776 setNodeInfo(value.get(), node, "nodeId", "nodeName"); |
| 777 return value; | 777 return value; |
| 778 } | 778 } |
| 779 | 779 |
| 780 } | 780 } |
| OLD | NEW |