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 c0eaf2464ad1ce073a4a366da2c551bb78b58b94..ff034153c96cca5600474eb76b4d0b542e8f5f5f 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -1490,6 +1490,11 @@ void PaintLayer::appendSingleFragmentIgnoringPagination(PaintLayerFragments& fra |
| fragments.append(fragment); |
| } |
| +bool PaintLayer::shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) const |
| +{ |
| + return enclosingPaginationLayer() && !compositingLayer->enclosingPaginationLayer(); |
|
wkorman
2016/06/02 18:04:15
Considering whether a comment to explain this furt
chrishtr
2016/06/02 18:22:43
Done.
|
| +} |
| + |
| 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) |
| @@ -1500,6 +1505,11 @@ void PaintLayer::collectFragments(PaintLayerFragments& fragments, const PaintLay |
| return; |
| } |
| + if (!shouldFragmentCompositedBounds(rootLayer)) { |
| + appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect, clipRectsCacheSlot, overlayScrollbarClipBehavior, respectOverflowClip, offsetFromRoot, subPixelAccumulation); |
| + return; |
| + } |
| + |
| // Compute our offset within the enclosing pagination layer. |
| LayoutPoint offsetWithinPaginatedLayer; |
| convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer); |
| @@ -2253,7 +2263,7 @@ LayoutRect PaintLayer::boundingBoxForCompositing(const PaintLayer* ancestorLayer |
| if (transform() && paintsWithTransform(GlobalPaintNormalPhase) && (this != ancestorLayer || options == MaybeIncludeTransformForAncestorLayer)) |
| result = transform()->mapRect(result); |
| - if (enclosingPaginationLayer()) { |
| + if (shouldFragmentCompositedBounds(ancestorLayer)) { |
| convertFromFlowThreadToVisualBoundingBoxInAncestor(ancestorLayer, result); |
| return result; |
| } |