Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index c3e5612689532ef98719d7440df328ebf2a8041b..096f44ea7001182011306cd0fe52e414573ee898 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -447,6 +447,13 @@ static void projectRectsToGraphicsLayerSpaceRecursive( |
} else { |
ASSERT(compositedLayer->hasCompositedLayerMapping()); |
CompositedLayerMappingPtr compositedLayerMapping = compositedLayer->compositedLayerMapping(); |
+ // The origin for the graphics layer does not have to be the same |
+ // as the composited layer (e.g. when a child layer has negative |
+ // offset and paints into this layer), so when projecting rects to |
+ // graphics layer space they have to be offset by the origin for |
+ // the composited layer. |
+ LayoutPoint graphicsLayerOffset = compositedLayerMapping->compositedBounds().location(); |
Ian Vollick
2014/04/23 20:18:38
It sounds like you want exactly CompositedLayerMap
Zeeshan Qureshi
2014/04/24 02:32:40
Excellent idea, done.
|
+ extraOffset = LayoutSize(-graphicsLayerOffset.x(), -graphicsLayerOffset.y()); |
// If the layer is using composited scrolling, then it's the contents that these |
// rects apply to. |
graphicsLayer = compositedLayerMapping->scrollingContentsLayer(); |