| Index: Source/core/rendering/svg/RenderSVGImage.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGImage.cpp b/Source/core/rendering/svg/RenderSVGImage.cpp
|
| index 4efac7e29b9eb638f86fc41a75e8384ef9c39d63..27c808e3226cb9e53ad543c0aaa750a23051a7fe 100644
|
| --- a/Source/core/rendering/svg/RenderSVGImage.cpp
|
| +++ b/Source/core/rendering/svg/RenderSVGImage.cpp
|
| @@ -124,7 +124,10 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&)
|
| {
|
| ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
|
|
|
| - if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
|
| + if (paintInfo.context->paintingDisabled()
|
| + || paintInfo.phase != PaintPhaseForeground
|
| + || style()->visibility() == HIDDEN
|
| + || !m_imageResource->hasImage())
|
| return;
|
|
|
| FloatRect boundingBox = repaintRectInLocalCoordinates();
|
| @@ -132,29 +135,27 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&)
|
| return;
|
|
|
| PaintInfo childPaintInfo(paintInfo);
|
| - bool drawsOutline = style()->outlineWidth() && (childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline);
|
| - if (drawsOutline || childPaintInfo.phase == PaintPhaseForeground) {
|
| - GraphicsContextStateSaver stateSaver(*childPaintInfo.context, false);
|
| - if (!m_localTransform.isIdentity()) {
|
| - stateSaver.save();
|
| - childPaintInfo.applyTransform(m_localTransform, false);
|
| - }
|
| - if (childPaintInfo.phase == PaintPhaseForeground && !m_objectBoundingBox.isEmpty()) {
|
| - // SVGRenderingContext may taint the state - make sure we're always saving.
|
| - SVGRenderingContext renderingContext(this, childPaintInfo, stateSaver.saved() ?
|
| - SVGRenderingContext::DontSaveGraphicsContext : SVGRenderingContext::SaveGraphicsContext);
|
| + GraphicsContextStateSaver stateSaver(*childPaintInfo.context, false);
|
|
|
| - if (renderingContext.isRenderingPrepared()) {
|
| - if (style()->svgStyle()->bufferedRendering() == BR_STATIC && renderingContext.bufferForeground(m_bufferedForeground))
|
| - return;
|
| + if (!m_localTransform.isIdentity()) {
|
| + stateSaver.save();
|
| + childPaintInfo.applyTransform(m_localTransform, false);
|
| + }
|
| + if (!m_objectBoundingBox.isEmpty()) {
|
| + // SVGRenderingContext may taint the state - make sure we're always saving.
|
| + SVGRenderingContext renderingContext(this, childPaintInfo, stateSaver.saved() ?
|
| + SVGRenderingContext::DontSaveGraphicsContext : SVGRenderingContext::SaveGraphicsContext);
|
|
|
| - paintForeground(childPaintInfo);
|
| - }
|
| - }
|
| + if (renderingContext.isRenderingPrepared()) {
|
| + if (style()->svgStyle()->bufferedRendering() == BR_STATIC && renderingContext.bufferForeground(m_bufferedForeground))
|
| + return;
|
|
|
| - if (drawsOutline)
|
| - paintOutline(childPaintInfo, IntRect(boundingBox));
|
| + paintForeground(childPaintInfo);
|
| + }
|
| }
|
| +
|
| + if (style()->outlineWidth())
|
| + paintOutline(childPaintInfo, IntRect(boundingBox));
|
| }
|
|
|
| void RenderSVGImage::paintForeground(PaintInfo& paintInfo)
|
|
|