Chromium Code Reviews| 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..9b57911cd411d18dd24fb274c4d51f11f337684c 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.width() > 0 && m_radii.height() > 0) { |
|
pdr.
2014/05/28 18:21:42
Here and above, isn't this !m_radii.isEmpty()?
fs
2014/05/30 07:43:46
This one should indeed be !isEmpty() - the above o
|
| + // 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()) |