| Index: Source/core/rendering/svg/RenderSVGEllipse.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGEllipse.cpp b/Source/core/rendering/svg/RenderSVGEllipse.cpp
|
| index 47ad9b9822549fd0d983ba4cdde7284bd636a0d0..66ac961ce5bc8885d869b849c4e6d79ccfb7e394 100644
|
| --- a/Source/core/rendering/svg/RenderSVGEllipse.cpp
|
| +++ b/Source/core/rendering/svg/RenderSVGEllipse.cpp
|
| @@ -60,8 +60,9 @@ void RenderSVGEllipse::updateShapeFromElement()
|
| return;
|
|
|
| if (!m_radii.isEmpty()) {
|
| - // Fallback to RenderSVGShape if shape has a non-scaling stroke.
|
| - if (hasNonScalingStroke()) {
|
| + // Fallback to RenderSVGShape and path-based hit detection if the ellipse
|
| + // has a non-scaling or discontinuous stroke.
|
| + if (hasNonScalingStroke() || !hasContinuousStroke()) {
|
| RenderSVGShape::updateShapeFromElement();
|
| m_usePathFallback = true;
|
| return;
|
| @@ -96,9 +97,9 @@ void RenderSVGEllipse::calculateRadiiAndCenter()
|
|
|
| bool RenderSVGEllipse::shapeDependentStrokeContains(const FloatPoint& point)
|
| {
|
| - // The optimized contains code below does not support non-smooth strokes so we need
|
| + // The optimized code below does not support discontinuous strokes so we need
|
| // to fall back to RenderSVGShape::shapeDependentStrokeContains in these cases.
|
| - if (m_usePathFallback || !hasSmoothStroke()) {
|
| + if (m_usePathFallback || !hasContinuousStroke()) {
|
| if (!hasPath())
|
| RenderSVGShape::updateShapeFromElement();
|
| return RenderSVGShape::shapeDependentStrokeContains(point);
|
| @@ -133,4 +134,10 @@ bool RenderSVGEllipse::shapeDependentFillContains(const FloatPoint& point, const
|
| return xrX * xrX + yrY * yrY <= 1.0;
|
| }
|
|
|
| +bool RenderSVGEllipse::hasContinuousStroke() const
|
| +{
|
| + const SVGRenderStyle& svgStyle = style()->svgStyle();
|
| + return svgStyle.strokeDashArray()->isEmpty();
|
| +}
|
| +
|
| }
|
|
|