Index: Source/core/rendering/RenderLayer.cpp |
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
index 70b7622e19c428d34775e5e7d5d26bef7804f207..f96df531e504e6cac84addc8667b7d8348668946 100644 |
--- a/Source/core/rendering/RenderLayer.cpp |
+++ b/Source/core/rendering/RenderLayer.cpp |
@@ -536,6 +536,25 @@ LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject |
return point; |
} |
+void RenderLayer::mapPointToPaintBackingCoordinates(const RenderLayerModelObject* paintInvalidationContainer, FloatPoint& point) |
+{ |
+ RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |
+ if (!paintInvalidationLayer->groupedMapping()) { |
+ point.move(paintInvalidationLayer->compositedLayerMapping()->contentOffsetInCompositingLayer()); |
+ return; |
+ } |
+ |
+ RenderLayerModelObject* transformedAncestor = paintInvalidationLayer->enclosingTransformedAncestor()->renderer(); |
+ if (!transformedAncestor) |
+ return; |
+ |
+ // |paintInvalidationContainer| may have a local 2D transform on it, so take that into account when mapping into the space of the |
+ // transformed ancestor. |
+ point = paintInvalidationContainer->localToContainerPoint(point, transformedAncestor); |
+ |
+ point.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTransformedAncestor()); |
+} |
+ |
void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect) |
{ |
RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer(); |