Index: Source/core/rendering/svg/RenderSVGEllipse.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGEllipse.cpp b/Source/core/rendering/svg/RenderSVGEllipse.cpp |
index bc3cfaea44be297b3752b1b772ab79e5cb10d9ea..5f77644c72b266b5614265c0299ef52dd9c6a94f 100644 |
--- a/Source/core/rendering/svg/RenderSVGEllipse.cpp |
+++ b/Source/core/rendering/svg/RenderSVGEllipse.cpp |
@@ -53,20 +53,22 @@ void RenderSVGEllipse::updateShapeFromElement() |
m_center = FloatPoint(); |
m_radii = FloatSize(); |
- // Fallback to RenderSVGShape if shape has a non-scaling stroke. |
- if (hasNonScalingStroke()) { |
- RenderSVGShape::updateShapeFromElement(); |
- m_usePathFallback = true; |
- return; |
- } else |
- m_usePathFallback = false; |
- |
calculateRadiiAndCenter(); |
// Spec: "A negative value is an error. A value of zero disables rendering of the element." |
- if (m_radii.isZero() || m_radii.width() < 0 || m_radii.height() < 0) |
+ if (m_radii.width() < 0 || m_radii.height() < 0) |
return; |
+ if (!m_radii.isEmpty()) { |
+ // Fallback to RenderSVGShape if shape has a non-scaling stroke. |
+ if (hasNonScalingStroke()) { |
+ RenderSVGShape::updateShapeFromElement(); |
+ m_usePathFallback = true; |
+ return; |
+ } |
+ m_usePathFallback = false; |
+ } |
+ |
m_fillBoundingBox = FloatRect(m_center.x() - m_radii.width(), m_center.y() - m_radii.height(), 2 * m_radii.width(), 2 * m_radii.height()); |
m_strokeBoundingBox = m_fillBoundingBox; |
if (style()->svgStyle()->hasStroke()) |