Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
index 72cdc71f262586e46fe0df356fcf1e8ab8d21d7b..13bcef09fe649d7d8265b0b7a8a748e715264a5f 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
@@ -593,9 +593,22 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration() |
if (style.preserves3D() && style.hasOpacity() && m_owningLayer.has3DTransformedDescendant()) |
UseCounter::count(layoutObject->document(), UseCounter::OpacityWithPreserve3DQuirk); |
+ setClippingOnRootScrollerAncestors(); |
+ |
return layerConfigChanged; |
} |
+void CompositedLayerMapping::setClippingOnRootScrollerAncestors() |
+{ |
+ bool shouldClip = !m_owningLayer.hasRootScrollerAsDescendant(); |
+ if (m_scrollingLayer) |
chrishtr
2016/09/01 23:42:56
Could you try moving these to the sites where we c
bokan
2016/09/09 00:19:02
Moved the m_scrollingLayer->setMasksBounds to happ
|
+ m_scrollingLayer->setMasksToBounds(shouldClip); |
+ if (m_ancestorClippingLayer) |
chrishtr
2016/09/01 23:42:56
Why have the m_ancestorClippingLayer layer at all
bokan
2016/09/09 00:19:02
Good point, I've moved these to the arguments that
|
+ m_ancestorClippingLayer->setMasksToBounds(shouldClip); |
+ if (m_childContainmentLayer) |
chrishtr
2016/09/01 23:42:56
ditto
bokan
2016/09/09 00:19:02
Done.
|
+ m_childContainmentLayer->setMasksToBounds(shouldClip); |
+} |
+ |
static IntRect clipBox(LayoutBox* layoutObject) |
{ |
// TODO(chrishtr): pixel snapping is most likely incorrect here. |