summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/SVGRenderSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/SVGRenderSupport.cpp')
-rw-r--r--WebCore/rendering/SVGRenderSupport.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index c2c8e0b..fb6866f 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -120,7 +120,7 @@ void SVGRenderBase::prepareToRenderSVGContent(RenderObject* object, RenderObject
#if ENABLE(FILTERS)
if (filter) {
filter->addClient(styledElement);
- filter->prepareFilter(paintInfo.context, object->objectBoundingBox());
+ filter->prepareFilter(paintInfo.context, object);
} else if (!filterId.isEmpty())
svgElement->document()->accessSVGExtensions()->addPendingResource(filterId, styledElement);
#endif
@@ -152,7 +152,7 @@ void SVGRenderBase::finishRenderSVGContent(RenderObject* object, RenderObject::P
#if ENABLE(FILTERS)
if (filter) {
- filter->applyFilter(paintInfo.context, object->objectBoundingBox());
+ filter->applyFilter(paintInfo.context, object);
paintInfo.context = savedContext;
}
#endif
@@ -169,9 +169,11 @@ void renderSubtreeToImage(ImageBuffer* image, RenderObject* item)
ASSERT(image->context());
RenderObject::PaintInfo info(image->context(), IntRect(), PaintPhaseForeground, 0, 0, 0);
+ // FIXME: isSVGContainer returns true for RenderSVGViewportContainer, so if this is ever
+ // called with one of those, we will read from the wrong offset in an object due to a bad cast.
RenderSVGContainer* svgContainer = 0;
if (item && item->isSVGContainer())
- svgContainer = static_cast<RenderSVGContainer*>(item);
+ svgContainer = toRenderSVGContainer(item);
bool drawsContents = svgContainer ? svgContainer->drawsContents() : false;
if (svgContainer && !drawsContents)