Chromium Code Reviews| Index: Source/core/rendering/RenderLayer.cpp |
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
| index 0447e81c4db73e425926c53ecf0c6230b6b3d4ff..6a4b6b5dc297d3946317e65be750fec83f96f2d9 100644 |
| --- a/Source/core/rendering/RenderLayer.cpp |
| +++ b/Source/core/rendering/RenderLayer.cpp |
| @@ -544,6 +544,25 @@ LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObje |
| return point; |
| } |
| +void RenderLayer::mapPointToPaintBackingCoordinates(const RenderLayerModelObject* paintInvalidationContainer, FloatPoint& point) |
|
chrishtr
2014/09/05 22:14:56
Almost all of this method is already present in Re
trchen
2014/09/06 00:06:26
Yep, this method maps from invalidation container
chrishtr
2014/09/06 00:12:19
No, you should use RenderLayer::positionFromPaintI
|
| +{ |
| + 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(); |