| 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())
|
|
|