| Index: Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorLayerTreeAgent.cpp b/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| index 9a154ee625d69cce116cdcb587a4c2985c4ce232..45accb3648ac538f4c7803e190c2c7a53ba8332d 100644
|
| --- a/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| +++ b/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| @@ -39,6 +39,7 @@
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/Settings.h"
|
| #include "core/inspector/IdentifiersFactory.h"
|
| +#include "core/inspector/InspectorPageAgent.h"
|
| #include "core/inspector/InspectorState.h"
|
| #include "core/inspector/InstrumentingAgents.h"
|
| #include "core/layout/LayoutPart.h"
|
| @@ -145,9 +146,9 @@
|
| return layerObject;
|
| }
|
|
|
| -InspectorLayerTreeAgent::InspectorLayerTreeAgent(LocalFrame* inspectedFrame)
|
| +InspectorLayerTreeAgent::InspectorLayerTreeAgent(InspectorPageAgent* pageAgent)
|
| : InspectorBaseAgent<InspectorLayerTreeAgent, InspectorFrontend::LayerTree>("LayerTree")
|
| - , m_inspectedFrame(inspectedFrame)
|
| + , m_pageAgent(pageAgent)
|
| {
|
| }
|
|
|
| @@ -157,7 +158,7 @@
|
|
|
| DEFINE_TRACE(InspectorLayerTreeAgent)
|
| {
|
| - visitor->trace(m_inspectedFrame);
|
| + visitor->trace(m_pageAgent);
|
| InspectorBaseAgent::trace(visitor);
|
| }
|
|
|
| @@ -171,9 +172,11 @@
|
| void InspectorLayerTreeAgent::enable(ErrorString*)
|
| {
|
| m_instrumentingAgents->setInspectorLayerTreeAgent(this);
|
| - Document* document = m_inspectedFrame->document();
|
| - if (document && document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
|
| - layerTreeDidChange();
|
| + if (LocalFrame* frame = m_pageAgent->inspectedFrame()) {
|
| + Document* document = frame->document();
|
| + if (document && document->lifecycle().state() >= DocumentLifecycle::CompositingClean)
|
| + layerTreeDidChange();
|
| + }
|
| }
|
|
|
| void InspectorLayerTreeAgent::disable(ErrorString*)
|
| @@ -253,14 +256,14 @@
|
|
|
| DeprecatedPaintLayerCompositor* InspectorLayerTreeAgent::deprecatedPaintLayerCompositor()
|
| {
|
| - LayoutView* layoutView = m_inspectedFrame->contentRenderer();
|
| + LayoutView* layoutView = m_pageAgent->inspectedFrame()->contentRenderer();
|
| DeprecatedPaintLayerCompositor* compositor = layoutView ? layoutView->compositor() : nullptr;
|
| return compositor;
|
| }
|
|
|
| GraphicsLayer* InspectorLayerTreeAgent::rootGraphicsLayer()
|
| {
|
| - return m_inspectedFrame->host()->pinchViewport().rootGraphicsLayer();
|
| + return m_pageAgent->frameHost()->pinchViewport().rootGraphicsLayer();
|
| }
|
|
|
| static GraphicsLayer* findLayerById(GraphicsLayer* root, int layerId)
|
|
|