| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| index 898e54807f2c45f42e1898c63a7d5ba1e10b2d66..2575360bdee56113726abfbc45fac6691d54ca36 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
|
| @@ -605,15 +605,14 @@ static String pointerAsString(const void* ptr) {
|
| std::unique_ptr<JSONObject> GraphicsLayer::layerTreeAsJSON(
|
| LayerTreeFlags flags) const {
|
| RenderingContextMap renderingContextMap;
|
| - if (flags & OutputChildrenAsLayerList) {
|
| - std::unique_ptr<JSONObject> json = JSONObject::create();
|
| - std::unique_ptr<JSONArray> layersArray = JSONArray::create();
|
| - for (auto& child : m_children)
|
| - child->layersAsJSONArray(flags, renderingContextMap, layersArray.get());
|
| - json->setArray("layers", std::move(layersArray));
|
| - return json;
|
| - }
|
| - return layerTreeAsJSONInternal(flags, renderingContextMap);
|
| + if (flags & OutputAsLayerTree)
|
| + return layerTreeAsJSONInternal(flags, renderingContextMap);
|
| + std::unique_ptr<JSONObject> json = JSONObject::create();
|
| + std::unique_ptr<JSONArray> layersArray = JSONArray::create();
|
| + for (auto& child : m_children)
|
| + child->layersAsJSONArray(flags, renderingContextMap, layersArray.get());
|
| + json->setArray("layers", std::move(layersArray));
|
| + return json;
|
| }
|
|
|
| std::unique_ptr<JSONObject> GraphicsLayer::layerAsJSONInternal(
|
|
|