Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| index f782b1f5fccd6c254b4cc187356ca2afcaa1efb1..e84caa5cab607278c09748cee4a8cced2921af22 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -1565,6 +1565,7 @@ void PaintLayer::appendSingleFragmentIgnoringPagination( |
| ClipRectsCacheSlot clipRectsCacheSlot, |
| OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, |
| ShouldRespectOverflowClipType respectOverflowClip, |
| + bool paintingAncestorClippingMask, |
| const LayoutPoint* offsetFromRoot, |
| const LayoutSize& subPixelAccumulation) { |
| PaintLayerFragment fragment; |
| @@ -1575,7 +1576,7 @@ void PaintLayer::appendSingleFragmentIgnoringPagination( |
| clipRectsContext.setIgnoreOverflowClip(); |
| clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, |
| fragment.backgroundRect, fragment.foregroundRect, |
| - offsetFromRoot); |
| + offsetFromRoot, paintingAncestorClippingMask); |
|
Stephen Chennney
2016/11/08 21:42:51
Here we can create a clipper (PaintLayerClipper) w
|
| fragments.append(fragment); |
| } |
| @@ -1593,6 +1594,7 @@ void PaintLayer::collectFragments( |
| ClipRectsCacheSlot clipRectsCacheSlot, |
| OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, |
| ShouldRespectOverflowClipType respectOverflowClip, |
| + bool paintingAncestorClippingMask, |
| const LayoutPoint* offsetFromRoot, |
| const LayoutSize& subPixelAccumulation, |
| const LayoutRect* layerBoundingBox) { |
| @@ -1600,16 +1602,16 @@ void PaintLayer::collectFragments( |
| // For unpaginated layers, there is only one fragment. |
| appendSingleFragmentIgnoringPagination( |
| fragments, rootLayer, dirtyRect, clipRectsCacheSlot, |
| - overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, |
| - subPixelAccumulation); |
| + overlayScrollbarClipBehavior, respectOverflowClip, |
| + paintingAncestorClippingMask, offsetFromRoot, subPixelAccumulation); |
| return; |
| } |
| if (!shouldFragmentCompositedBounds(rootLayer)) { |
| appendSingleFragmentIgnoringPagination( |
| fragments, rootLayer, dirtyRect, clipRectsCacheSlot, |
| - overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, |
| - subPixelAccumulation); |
| + overlayScrollbarClipBehavior, respectOverflowClip, |
| + paintingAncestorClippingMask, offsetFromRoot, subPixelAccumulation); |
| return; |
| } |
| @@ -1632,7 +1634,8 @@ void PaintLayer::collectFragments( |
| clipper().calculateRects( |
| paginationClipRectsContext, LayoutRect(LayoutRect::infiniteIntRect()), |
| layerBoundsInFlowThread, backgroundRectInFlowThread, |
| - foregroundRectInFlowThread, &offsetWithinPaginatedLayer); |
| + foregroundRectInFlowThread, &offsetWithinPaginatedLayer, |
| + paintingAncestorClippingMask); |
| // Take our bounding box within the flow thread and clip it. |
| LayoutRect layerBoundingBoxInFlowThread = |
| @@ -2163,7 +2166,7 @@ PaintLayer* PaintLayer::hitTestTransformedLayerInFragments( |
| PaintLayer::RootOfTransparencyClipBox, LayoutSize()); |
| enclosingPaginationLayer()->collectFragments( |
| enclosingPaginationFragments, rootLayer, hitTestRect, clipRectsCacheSlot, |
| - ExcludeOverlayScrollbarSizeForHitTesting, RespectOverflowClip, |
| + ExcludeOverlayScrollbarSizeForHitTesting, RespectOverflowClip, false, |
| &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent); |
| for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) { |