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 1ab53d95b8ebf5c2ffe54fdb50e2e6c5f4de2839..439470c7a46c1a0ee9db1e1293e848e7ba853368 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
@@ -1646,10 +1646,9 @@ |
overlayScrollbarClipBehavior); |
if (respectOverflowClip == IgnoreOverflowClip) |
clipRectsContext.setIgnoreOverflowClip(); |
- |
- enclosingPaginationLayer() |
- ->clipper(geometryMapperOption) |
- .calculateBackgroundClipRect(clipRectsContext, ancestorClipRect); |
+ ancestorClipRect = enclosingPaginationLayer() |
+ ->clipper(geometryMapperOption) |
+ .backgroundClipRect(clipRectsContext); |
if (rootLayerIsInsidePaginationLayer) |
ancestorClipRect.moveBy( |
-rootLayer->visualOffsetFromAncestor(ancestorLayer)); |
@@ -1900,12 +1899,10 @@ |
// Make sure the parent's clip rects have been calculated. |
if (parent()) { |
- ClipRect clipRect; |
- clipper(PaintLayer::DoNotUseGeometryMapper) |
- .calculateBackgroundClipRect( |
- ClipRectsContext(rootLayer, clipRectsCacheSlot, |
- ExcludeOverlayScrollbarSizeForHitTesting), |
- clipRect); |
+ ClipRect clipRect = clipper(PaintLayer::DoNotUseGeometryMapper) |
+ .backgroundClipRect(ClipRectsContext( |
+ rootLayer, clipRectsCacheSlot, |
+ ExcludeOverlayScrollbarSizeForHitTesting)); |
// Go ahead and test the enclosing clip now. |
if (!clipRect.intersects(hitTestLocation)) |
return nullptr; |
@@ -2144,17 +2141,15 @@ |
if (parent() != enclosingPaginationLayer()) { |
enclosingPaginationLayer()->convertToLayerCoords( |
rootLayer, offsetOfPaginationLayerFromRoot); |
- |
- ClipRect parentClipRect; |
- clipper(PaintLayer::DoNotUseGeometryMapper) |
- .calculateBackgroundClipRect( |
- ClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, |
- ExcludeOverlayScrollbarSizeForHitTesting), |
- parentClipRect); |
- |
+ LayoutRect parentClipRect = |
+ clipper(PaintLayer::DoNotUseGeometryMapper) |
+ .backgroundClipRect(ClipRectsContext( |
+ enclosingPaginationLayer(), clipRectsCacheSlot, |
+ ExcludeOverlayScrollbarSizeForHitTesting)) |
+ .rect(); |
parentClipRect.moveBy(fragment.paginationOffset + |
offsetOfPaginationLayerFromRoot); |
- clipRect.intersect(parentClipRect.rect()); |
+ clipRect.intersect(parentClipRect); |
} |
if (!hitTestLocation.intersects(clipRect)) |