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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Reupload Created 7 years, 3 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
Index: Source/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index 0f301195a92c8c8dfed69549de1804e1d786c818..7ce6050fd42faed7a508cc5a35d2bcd75b7913a8 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -2431,10 +2431,14 @@ void RenderLayerCompositor::ensureRootLayer()
// Create a layer to host the clipping layer and the overflow controls layers.
m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
- // Create a clipping layer if this is an iframe
+ // Create a clipping layer if this is an iframe or settings require to clip.
m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
- if (!isMainFrame())
- m_containerLayer->setMasksToBounds(true);
+ bool containerMasksToBounds = !isMainFrame();
+ if (Settings* settings = m_renderView->document().settings()) {
+ if (settings->rootLayerClipsContent())
+ containerMasksToBounds = true;
+ }
+ m_containerLayer->setMasksToBounds(containerMasksToBounds);
m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())

Powered by Google App Engine
This is Rietveld 408576698