Index: Source/core/rendering/RenderLayer.cpp |
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
index 820535bab6ef49aac21abc5b3baf36b0dc17e717..7590dc336972b7e992d20442739700af535d315e 100644 |
--- a/Source/core/rendering/RenderLayer.cpp |
+++ b/Source/core/rendering/RenderLayer.cpp |
@@ -560,29 +560,28 @@ void RenderLayer::updatePagination() |
} |
} |
-LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer) |
+LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) |
{ |
if (!paintInvalidationContainer || !paintInvalidationContainer->layer()->groupedMapping()) |
- return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer); |
+ return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer, invalidationTreeWalkState); |
RenderLayerModelObject* transformedAncestor = paintInvalidationContainer->layer()->enclosingTransformedAncestor()->renderer(); |
if (!transformedAncestor) |
- return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer); |
+ return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer, invalidationTreeWalkState); |
// If the transformedAncestor is actually the RenderView, we might get |
// confused and think that we can use LayoutState. Ideally, we'd made |
// LayoutState work for all composited layers as well, but until then |
// we need to disable LayoutState for squashed layers. |
- ForceHorriblySlowRectMapping slowRectMapping(*transformedAncestor); |
+ ForceHorriblySlowRectMapping slowRectMapping(invalidationTreeWalkState); |
- LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(transformedAncestor); |
+ LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(transformedAncestor, invalidationTreeWalkState); |
point.moveBy(-paintInvalidationContainer->layer()->groupedMapping()->squashingOffsetFromTransformedAncestor()); |
return point; |
} |
void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect) |
{ |
- |
RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
if (!paintInvalidationLayer->groupedMapping()) { |
rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffsetInCompositingLayer()); |
@@ -593,12 +592,6 @@ void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject* |
if (!transformedAncestor) |
return; |
- // If the transformedAncestor is actually the RenderView, we might get |
- // confused and think that we can use LayoutState. Ideally, we'd made |
- // LayoutState work for all composited layers as well, but until then |
- // we need to disable LayoutState for squashed layers. |
- ForceHorriblySlowRectMapping slowRectMapping(*transformedAncestor); |
- |
// |repaintContainer| may have a local 2D transform on it, so take that into account when mapping into the space of the |
// transformed ancestor. |
rect = LayoutRect(paintInvalidationContainer->localToContainerQuad(FloatRect(rect), transformedAncestor).boundingBox()); |
@@ -606,10 +599,10 @@ void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject* |
rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTransformedAncestor()); |
} |
-void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect) |
+void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const InvalidationTreeWalkState* invalidationTreeWalkState) |
{ |
if (!paintInvalidationContainer->layer()->groupedMapping()) { |
- renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect); |
+ renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, invalidationTreeWalkState); |
return; |
} |
@@ -617,17 +610,17 @@ void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderOb |
// layer. This is because all layers that squash together need to repaint w.r.t. a single container that is |
// an ancestor of all of them, in order to properly take into account any local transforms etc. |
// FIXME: remove this special-case code that works around the repainting code structure. |
- renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect); |
+ renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, invalidationTreeWalkState); |
RenderLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); |
} |
-LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderObject, const RenderLayer* paintInvalidationContainer) |
+LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderObject, const RenderLayer* paintInvalidationContainer, const InvalidationTreeWalkState* invalidationTreeWalkState) |
{ |
if (!paintInvalidationContainer->groupedMapping()) |
return renderObject->computePaintInvalidationRect(paintInvalidationContainer->renderer()); |
LayoutRect rect = renderObject->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer->renderer()); |
- mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), paintInvalidationContainer->renderer(), rect); |
+ mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), paintInvalidationContainer->renderer(), rect, invalidationTreeWalkState); |
return rect; |
} |