summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderSVGRoot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderSVGRoot.cpp')
-rw-r--r--WebCore/rendering/RenderSVGRoot.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 6017513..70ff938 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -144,12 +144,16 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY)
if (paintInfo.context->paintingDisabled())
return;
+ bool isVisible = style()->visibility() == VISIBLE;
IntPoint parentOriginInContainer(parentX, parentY);
IntPoint borderBoxOriginInContainer = parentOriginInContainer + parentOriginToBorderBox();
- if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
+ if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground) && isVisible)
paintBoxDecorations(paintInfo, borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y());
+ if (paintInfo.phase == PaintPhaseBlockBackground)
+ return;
+
// An empty viewport disables rendering. FIXME: Should we still render filters?
if (m_viewportSize.isEmpty())
return;
@@ -184,7 +188,7 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY)
childPaintInfo.context->restore();
- if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE)
+ if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && isVisible)
paintOutline(paintInfo.context, borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y(), width(), height());
}