summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderSVGImage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderSVGImage.cpp')
-rw-r--r--WebCore/rendering/RenderSVGImage.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp
index a4572e6..44b68b1 100644
--- a/WebCore/rendering/RenderSVGImage.cpp
+++ b/WebCore/rendering/RenderSVGImage.cpp
@@ -52,7 +52,7 @@ void RenderSVGImage::layout()
{
ASSERT(needsLayout());
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGImageElement* image = static_cast<SVGImageElement*>(node());
if (m_needsTransformUpdate) {
@@ -66,11 +66,15 @@ void RenderSVGImage::layout()
calcWidth();
calcHeight();
+ // FIXME: Optimize caching the repaint rects.
m_localBounds = FloatRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
m_cachedLocalRepaintRect = FloatRect();
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
repainter.repaintAfterLayout();
-
setNeedsLayout(false);
}