Index: Source/WebCore/rendering/RenderBoxModelObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 145949) |
+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy) |
@@ -868,7 +868,7 @@ |
// no progressive loading of the background image |
if (shouldPaintBackgroundImage) { |
BackgroundImageGeometry geometry; |
- calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect, geometry); |
+ calculateBackgroundImageGeometry(bgLayer, scrolledPaintRect, geometry, backgroundObject); |
geometry.clip(paintInfo.rect); |
if (!geometry.destRect().isEmpty()) { |
CompositeOperator compositeOp = op == CompositeSourceOver ? bgLayer->composite() : op; |
@@ -1107,7 +1107,7 @@ |
} |
void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fillLayer, const LayoutRect& paintRect, |
- BackgroundImageGeometry& geometry) |
+ BackgroundImageGeometry& geometry, RenderObject* backgroundObject) |
{ |
LayoutUnit left = 0; |
LayoutUnit top = 0; |
@@ -1167,8 +1167,9 @@ |
positioningAreaSize = geometry.destRect().size(); |
} |
+ RenderObject* clientForBackgroundImage = backgroundObject ? backgroundObject : this; |
IntSize fillTileSize = calculateFillTileSize(fillLayer, positioningAreaSize); |
- fillLayer->image()->setContainerSizeForRenderer(this, fillTileSize, style()->effectiveZoom()); |
+ fillLayer->image()->setContainerSizeForRenderer(clientForBackgroundImage, fillTileSize, style()->effectiveZoom()); |
geometry.setTileSize(fillTileSize); |
EFillRepeat backgroundRepeatX = fillLayer->repeatX(); |