Index: Source/core/rendering/RenderLayerCompositor.cpp |
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp |
index 1ea9f0d6cac234fff5d3b12110d82d54db11b137..a9d0b18b44cb9043f88c46c8afbf199953a32729 100644 |
--- a/Source/core/rendering/RenderLayerCompositor.cpp |
+++ b/Source/core/rendering/RenderLayerCompositor.cpp |
@@ -2434,10 +2434,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->mainFrameClipsContent()) |
+ containerMasksToBounds = true; |
+ } |
+ m_containerLayer->setMasksToBounds(containerMasksToBounds); |
m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); |
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |