Chromium Code Reviews| Index: Source/core/rendering/RenderLayer.cpp |
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
| index edb6c4f01111168c834f39b68220f0542c9d072f..0dcae8a0d82f7cb6c1cdd7e55b3c19e459330ecc 100644 |
| --- a/Source/core/rendering/RenderLayer.cpp |
| +++ b/Source/core/rendering/RenderLayer.cpp |
| @@ -557,29 +557,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. |
|
dsinclair
2014/07/02 18:48:24
Comment is out of date.
(We removed a very simila
|
| - 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()); |
| @@ -590,12 +589,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()); |
| @@ -603,10 +596,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; |
| } |
| @@ -614,17 +607,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; |
| } |