| Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| index 10265b8794fe1402aa55e40a486998979d4f50d1..08cd0cc1ebff9c2eb9815d89601478ee67debb17 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| @@ -721,8 +721,14 @@ std::unique_ptr<JSONObject> PaintLayerCompositor::layerTreeAsJSON(
|
| // similar between platforms (unless we explicitly request dumping from the
|
| // root.
|
| GraphicsLayer* rootLayer = m_rootContentLayer.get();
|
| - if (flags & LayerTreeIncludesRootLayer)
|
| - rootLayer = rootGraphicsLayer();
|
| + if (flags & LayerTreeIncludesRootLayer) {
|
| + if (m_layoutView.frame()->isMainFrame()) {
|
| + while (rootLayer->parent())
|
| + rootLayer = rootLayer->parent();
|
| + } else {
|
| + rootLayer = rootGraphicsLayer();
|
| + }
|
| + }
|
|
|
| return rootLayer->layerTreeAsJSON(flags);
|
| }
|
|
|