Index: third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp |
diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp |
index bd8878a302b1dba1b02acd1c370850ad6cce395d..f31e457490999375f65e7d1ec74f90bbfffe1a4d 100644 |
--- a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp |
+++ b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp |
@@ -20,7 +20,7 @@ LayerClipRecorder::LayerClipRecorder( |
const LayoutBoxModelObject& layoutObject, |
DisplayItem::Type clipType, |
const ClipRect& clipRect, |
- const PaintLayerPaintingInfo* localPaintingInfo, |
+ const PaintLayer* clipRoot, |
const LayoutPoint& fragmentOffset, |
PaintLayerFlags paintFlags, |
BorderRadiusClippingRule rule) |
@@ -29,8 +29,8 @@ LayerClipRecorder::LayerClipRecorder( |
m_clipType(clipType) { |
IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); |
Vector<FloatRoundedRect> roundedRects; |
- if (localPaintingInfo && clipRect.hasRadius()) { |
- collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo, |
+ if (clipRoot && clipRect.hasRadius()) { |
+ collectRoundedRectClips(*layoutObject.layer(), clipRoot, |
graphicsContext, fragmentOffset, paintFlags, rule, |
roundedRects); |
} |
@@ -58,7 +58,7 @@ static bool inContainingBlockChain(PaintLayer* startLayer, |
void LayerClipRecorder::collectRoundedRectClips( |
PaintLayer& paintLayer, |
- const PaintLayerPaintingInfo& localPaintingInfo, |
+ const PaintLayer* clipRoot, |
GraphicsContext& context, |
const LayoutPoint& fragmentOffset, |
PaintLayerFlags paintFlags, |
@@ -79,14 +79,15 @@ void LayerClipRecorder::collectRoundedRectClips( |
// is properly clipped so that it can in turn clip the scrolled contents in |
// the compositor. |
if (layer->needsCompositedScrolling() && |
- !(paintFlags & PaintLayerPaintingChildClippingMaskPhase)) |
+ !(paintFlags & PaintLayerPaintingChildClippingMaskPhase || |
+ paintFlags & PaintLayerPaintingAncestorClippingMaskPhase)) |
break; |
if (layer->layoutObject()->hasOverflowClip() && |
layer->layoutObject()->style()->hasBorderRadius() && |
inContainingBlockChain(&paintLayer, layer)) { |
LayoutPoint delta(fragmentOffset); |
- layer->convertToLayerCoords(localPaintingInfo.rootLayer, delta); |
+ layer->convertToLayerCoords(clipRoot, delta); |
// The PaintLayer's size is pixel-snapped if it is a LayoutBox. We can't |
// use a pre-snapped border rect for clipping, since |
@@ -99,7 +100,7 @@ void LayerClipRecorder::collectRoundedRectClips( |
LayoutRect(delta, size))); |
} |
- if (layer == localPaintingInfo.rootLayer) |
+ if (layer == clipRoot) |
break; |
} |
} |