| 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 31f8ee2d104ebae710d4c52fe5809556e0a1c986..cd989bda4b78bbd7be86a16ad1a630a8814a88df 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -1477,13 +1477,15 @@ bool PaintLayer::hasOverflowControls() const
|
| return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollableArea->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE);
|
| }
|
|
|
| -void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation)
|
| +void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect,
|
| + ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip,
|
| + bool paintingAncestorClippingMask, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation)
|
| {
|
| PaintLayerFragment fragment;
|
| ClipRectsContext clipRectsContext(rootLayer, clipRectsCacheSlot, overlayScrollbarClipBehavior, subPixelAccumulation);
|
| if (respectOverflowClip == IgnoreOverflowClip)
|
| clipRectsContext.setIgnoreOverflowClip();
|
| - clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, fragment.backgroundRect, fragment.foregroundRect, offsetFromRoot);
|
| + clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, fragment.backgroundRect, fragment.foregroundRect, offsetFromRoot, paintingAncestorClippingMask);
|
| fragments.append(fragment);
|
| }
|
|
|
| @@ -1494,17 +1496,19 @@ bool PaintLayer::shouldFragmentCompositedBounds(const PaintLayer* compositingLay
|
| }
|
|
|
| void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLayer* rootLayer, const LayoutRect& dirtyRect,
|
| - ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip, const LayoutPoint* offsetFromRoot,
|
| - const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
|
| + ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, ShouldRespectOverflowClipType respectOverflowClip,
|
| + bool paintingAncestorClippingMask, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
|
| {
|
| if (!enclosingPaginationLayer()) {
|
| // For unpaginated layers, there is only one fragment.
|
| - appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, subPixelAccumulation);
|
| + appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip,
|
| + paintingAncestorClippingMask, offsetFromRoot, subPixelAccumulation);
|
| return;
|
| }
|
|
|
| if (!shouldFragmentCompositedBounds(rootLayer)) {
|
| - appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, subPixelAccumulation);
|
| + appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip,
|
| + paintingAncestorClippingMask, offsetFromRoot, subPixelAccumulation);
|
| return;
|
| }
|
|
|
| @@ -1521,7 +1525,7 @@ void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLay
|
| ClipRect backgroundRectInFlowThread;
|
| ClipRect foregroundRectInFlowThread;
|
| clipper().calculateRects(paginationClipRectsContext, LayoutRect(LayoutRect::infiniteIntRect()), layerBoundsInFlowThread,
|
| - backgroundRectInFlowThread, foregroundRectInFlowThread, &offsetWithinPaginatedLayer);
|
| + backgroundRectInFlowThread, foregroundRectInFlowThread, &offsetWithinPaginatedLayer, paintingAncestorClippingMask);
|
|
|
| // Take our bounding box within the flow thread and clip it.
|
| LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingBox : physicalBoundingBox(offsetWithinPaginatedLayer);
|
| @@ -1943,7 +1947,7 @@ PaintLayer* PaintLayer::hitTestTransformedLayerInFragments(PaintLayer* rootLayer
|
| // FIXME: We're missing a sub-pixel offset here crbug.com/348728
|
| LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), HitTestingTransparencyClipBox, PaintLayer::RootOfTransparencyClipBox, LayoutSize());
|
| enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, rootLayer, hitTestRect,
|
| - clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
|
| + clipRectsCacheSlot, ExcludeOverlayScrollbarSizeForHitTesting, RespectOverflowClip, false, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
|
|
|
| for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
|
| const PaintLayerFragment& fragment = enclosingPaginationFragments.at(i);
|
|
|