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 3b2bcb15c6691313f82f4ed4db17bae6488d72a8..34737c549cb1ded037fe55823edc2747e30be26b 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
@@ -55,6 +55,7 @@ |
#include "core/paint/FramePainter.h" |
#include "core/paint/TransformRecorder.h" |
#include "platform/Histogram.h" |
+#include "platform/JSONValues.h" |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/ScriptForbiddenScope.h" |
#include "platform/TraceEvent.h" |
@@ -646,12 +647,12 @@ bool PaintLayerCompositor::scrollingLayerDidChange(PaintLayer* layer) |
return false; |
} |
-String PaintLayerCompositor::layerTreeAsText(LayerTreeFlags flags) |
+PassRefPtr<JSONObject> PaintLayerCompositor::layerTreeAsJSON(LayerTreeFlags flags) const |
{ |
ASSERT(lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean || m_layoutView.frameView()->shouldThrottleRendering()); |
if (!m_rootContentLayer) |
- return String(); |
+ return nullptr; |
// We skip dumping the scroll and clip layers to keep layerTreeAsText output |
// similar between platforms (unless we explicitly request dumping from the |
@@ -660,7 +661,7 @@ String PaintLayerCompositor::layerTreeAsText(LayerTreeFlags flags) |
if (flags & LayerTreeIncludesRootLayer) |
rootLayer = rootGraphicsLayer(); |
- return rootLayer->layerTreeAsText(flags); |
+ return rootLayer->layerTreeAsJSON(flags); |
} |
PaintLayerCompositor* PaintLayerCompositor::frameContentsCompositor(LayoutPart* layoutObject) |