Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2679553006: Include VisualViewport layers in layerTreeAsText output. (Closed)
Patch Set: rebaseline Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698