Index: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
index 214c5beccd500073757151192bf0383e8f21fb45..d36d6165fd64bb7a93b872befb38cb0d0f673e69 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
@@ -189,7 +189,7 @@ LayoutRect PaintLayerClipper::localClipRect(const PaintLayer* clippingRootLayer) |
} |
void PaintLayerClipper::calculateRects(const ClipRectsContext& context, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, |
- ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* offsetFromRoot) const |
+ ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* offsetFromRoot, const bool addAncestorClips) const |
{ |
bool isClippingRoot = &m_layer == context.rootLayer; |
LayoutBoxModelObject& layoutObject = *m_layer.layoutObject(); |
@@ -212,9 +212,9 @@ void PaintLayerClipper::calculateRects(const ClipRectsContext& context, const La |
layerBounds = LayoutRect(offset, LayoutSize(m_layer.size())); |
// Update the clip rects that will be passed to child layers. |
- if ((layoutObject.hasOverflowClip() || layoutObject.styleRef().containsPaint()) && shouldRespectOverflowClip(context)) { |
+ if (addAncestorClips || ((layoutObject.hasOverflowClip() || layoutObject.styleRef().containsPaint()) && shouldRespectOverflowClip(context))) { |
foregroundRect.intersect(toLayoutBox(layoutObject).overflowClipRect(offset, context.overlayScrollbarClipBehavior)); |
- if (layoutObject.styleRef().hasBorderRadius()) |
+ if (layoutObject.styleRef().hasBorderRadius() || addAncestorClips) |
chrishtr
2016/10/21 23:16:20
What does this one achieve? It seems to force sett
Stephen Chennney
2016/10/24 20:15:27
This is the hackish part of the whole thing. It's
|
foregroundRect.setHasRadius(true); |
// FIXME: Does not do the right thing with columns yet, since we don't yet factor in the |