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 0ff40ac98a76e1f0088eed1ff66a42638ab3a422..769234c559a067b5e1fdb31b97e52dfe362e5f88 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp |
@@ -268,10 +268,17 @@ void PaintLayerClipper::calculateClipRects(const ClipRectsContext& context, Clip |
adjustClipRectsForChildren(m_layoutObject, clipRects); |
if ((m_layoutObject.hasOverflowClip() && shouldRespectOverflowClip(context)) || m_layoutObject.hasClip()) { |
+ const PaintLayer* layer = m_layoutObject.layer(); |
+ const PaintLayer* layerToStopAt = context.rootLayer; |
+ if (const PaintLayer* paginationLayer = layer->enclosingPaginationLayer()) { |
+ // Stop at the multicol container, unless the root layer is also inside it. |
+ if (layerToStopAt->enclosingPaginationLayer() != paginationLayer) |
+ layerToStopAt = paginationLayer; |
chrishtr
2015/12/14 21:39:51
Why not just require users of PaintLayerClipper to
|
+ } |
// This offset cannot use convertToLayerCoords, because sometimes our rootLayer may be across |
// some transformed layer boundary, for example, in the PaintLayerCompositor overlapMap, where |
// clipRects are needed in view space. |
- applyClipRects(context, m_layoutObject, roundedLayoutPoint(m_layoutObject.localToContainerPoint(FloatPoint(), context.rootLayer->layoutObject())), clipRects); |
+ applyClipRects(context, m_layoutObject, roundedLayoutPoint(m_layoutObject.localToContainerPoint(FloatPoint(), layerToStopAt->layoutObject())), clipRects); |
} |
} |