| 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 3d85217b81a1340f8fb9dac6d3d884ab67248c9f..bd8878a302b1dba1b02acd1c370850ad6cce395d 100644
|
| --- a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
|
| @@ -15,22 +15,24 @@
|
|
|
| namespace blink {
|
|
|
| -LayerClipRecorder::LayerClipRecorder(GraphicsContext& graphicsContext,
|
| - const LayoutBoxModelObject& layoutObject,
|
| - DisplayItem::Type clipType,
|
| - const ClipRect& clipRect,
|
| - const PaintLayer* clipRoot,
|
| - const LayoutPoint& fragmentOffset,
|
| - PaintLayerFlags paintFlags,
|
| - BorderRadiusClippingRule rule)
|
| +LayerClipRecorder::LayerClipRecorder(
|
| + GraphicsContext& graphicsContext,
|
| + const LayoutBoxModelObject& layoutObject,
|
| + DisplayItem::Type clipType,
|
| + const ClipRect& clipRect,
|
| + const PaintLayerPaintingInfo* localPaintingInfo,
|
| + const LayoutPoint& fragmentOffset,
|
| + PaintLayerFlags paintFlags,
|
| + BorderRadiusClippingRule rule)
|
| : m_graphicsContext(graphicsContext),
|
| m_layoutObject(layoutObject),
|
| m_clipType(clipType) {
|
| IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
|
| Vector<FloatRoundedRect> roundedRects;
|
| - if (clipRoot && clipRect.hasRadius()) {
|
| - collectRoundedRectClips(*layoutObject.layer(), clipRoot, graphicsContext,
|
| - fragmentOffset, paintFlags, rule, roundedRects);
|
| + if (localPaintingInfo && clipRect.hasRadius()) {
|
| + collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo,
|
| + graphicsContext, fragmentOffset, paintFlags, rule,
|
| + roundedRects);
|
| }
|
|
|
| m_graphicsContext.getPaintController().createAndAppend<ClipDisplayItem>(
|
| @@ -56,7 +58,7 @@ static bool inContainingBlockChain(PaintLayer* startLayer,
|
|
|
| void LayerClipRecorder::collectRoundedRectClips(
|
| PaintLayer& paintLayer,
|
| - const PaintLayer* clipRoot,
|
| + const PaintLayerPaintingInfo& localPaintingInfo,
|
| GraphicsContext& context,
|
| const LayoutPoint& fragmentOffset,
|
| PaintLayerFlags paintFlags,
|
| @@ -77,15 +79,14 @@ 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 & PaintLayerPaintingAncestorClippingMaskPhase))
|
| + !(paintFlags & PaintLayerPaintingChildClippingMaskPhase))
|
| break;
|
|
|
| if (layer->layoutObject()->hasOverflowClip() &&
|
| layer->layoutObject()->style()->hasBorderRadius() &&
|
| inContainingBlockChain(&paintLayer, layer)) {
|
| LayoutPoint delta(fragmentOffset);
|
| - layer->convertToLayerCoords(clipRoot, delta);
|
| + layer->convertToLayerCoords(localPaintingInfo.rootLayer, 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
|
| @@ -98,7 +99,7 @@ void LayerClipRecorder::collectRoundedRectClips(
|
| LayoutRect(delta, size)));
|
| }
|
|
|
| - if (layer == clipRoot)
|
| + if (layer == localPaintingInfo.rootLayer)
|
| break;
|
| }
|
| }
|
|
|