| Index: Source/core/inspector/InspectorAnimationAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorAnimationAgent.cpp b/Source/core/inspector/InspectorAnimationAgent.cpp
|
| index f9b4e0d15bf13384d47abac563a6d58fac5e3593..c579916c4c5d460e294d9f451eb04260bf798631 100644
|
| --- a/Source/core/inspector/InspectorAnimationAgent.cpp
|
| +++ b/Source/core/inspector/InspectorAnimationAgent.cpp
|
| @@ -20,6 +20,7 @@
|
| #include "core/css/resolver/StyleResolver.h"
|
| #include "core/dom/DOMNodeIds.h"
|
| #include "core/inspector/InspectorDOMAgent.h"
|
| +#include "core/inspector/InspectorPageAgent.h"
|
| #include "core/inspector/InspectorState.h"
|
| #include "core/inspector/InspectorStyleSheet.h"
|
| #include "platform/Decimal.h"
|
| @@ -31,9 +32,9 @@
|
|
|
| namespace blink {
|
|
|
| -InspectorAnimationAgent::InspectorAnimationAgent(LocalFrame* inspectedFrame, InspectorDOMAgent* domAgent)
|
| +InspectorAnimationAgent::InspectorAnimationAgent(InspectorPageAgent* pageAgent, InspectorDOMAgent* domAgent)
|
| : InspectorBaseAgent<InspectorAnimationAgent, InspectorFrontend::Animation>("Animation")
|
| - , m_inspectedFrame(inspectedFrame)
|
| + , m_pageAgent(pageAgent)
|
| , m_domAgent(domAgent)
|
| {
|
| }
|
| @@ -62,7 +63,7 @@
|
|
|
| void InspectorAnimationAgent::didCommitLoadForLocalFrame(LocalFrame* frame)
|
| {
|
| - if (frame == m_inspectedFrame) {
|
| + if (frame == m_pageAgent->inspectedFrame()) {
|
| m_idToAnimationPlayer.clear();
|
| m_idToAnimationType.clear();
|
| }
|
| @@ -243,7 +244,7 @@
|
|
|
| void InspectorAnimationAgent::setPlaybackRate(ErrorString*, double playbackRate)
|
| {
|
| - for (Frame* frame = m_inspectedFrame; frame; frame = frame->tree().traverseNext(m_inspectedFrame)) {
|
| + for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext(m_pageAgent->inspectedFrame())) {
|
| if (frame->isLocalFrame())
|
| toLocalFrame(frame)->document()->timeline().setPlaybackRate(playbackRate);
|
| }
|
| @@ -252,7 +253,7 @@
|
| void InspectorAnimationAgent::setCurrentTime(ErrorString*, double currentTime)
|
| {
|
| double timeDelta = currentTime - referenceTimeline().currentTime();
|
| - for (Frame* frame = m_inspectedFrame; frame; frame = frame->tree().traverseNext(m_inspectedFrame)) {
|
| + for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext(m_pageAgent->inspectedFrame())) {
|
| if (frame->isLocalFrame()) {
|
| AnimationTimeline& timeline = toLocalFrame(frame)->document()->timeline();
|
| timeline.setCurrentTime(timeline.currentTime() + timeDelta);
|
| @@ -344,7 +345,7 @@
|
|
|
| AnimationTimeline& InspectorAnimationAgent::referenceTimeline()
|
| {
|
| - return m_inspectedFrame->document()->timeline();
|
| + return m_pageAgent->inspectedFrame()->document()->timeline();
|
| }
|
|
|
| double InspectorAnimationAgent::normalizedStartTime(AnimationPlayer& player)
|
| @@ -357,7 +358,7 @@
|
| DEFINE_TRACE(InspectorAnimationAgent)
|
| {
|
| #if ENABLE(OILPAN)
|
| - visitor->trace(m_inspectedFrame);
|
| + visitor->trace(m_pageAgent);
|
| visitor->trace(m_domAgent);
|
| visitor->trace(m_idToAnimationPlayer);
|
| visitor->trace(m_idToAnimationType);
|
|
|