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

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

Issue 2289833002: Disable clipping on root scroller's ancestors. (Closed)
Patch Set: Created 4 years, 4 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: 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.

Powered by Google App Engine
This is Rietveld 408576698