| Index: Source/core/rendering/svg/RenderSVGShape.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGShape.cpp b/Source/core/rendering/svg/RenderSVGShape.cpp
|
| index 92e822d3146ad2acb68869289c1cf5e0e26301bc..31113917f5f6a60de3195884e01d840845494316 100644
|
| --- a/Source/core/rendering/svg/RenderSVGShape.cpp
|
| +++ b/Source/core/rendering/svg/RenderSVGShape.cpp
|
| @@ -101,7 +101,7 @@ bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co
|
|
|
| bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke)
|
| {
|
| - if (!strokeBoundingBox().contains(point))
|
| + if (!(requiresStroke ? actualStrokeBoundingBox() : m_strokeBoundingBox).contains(point))
|
| return false;
|
|
|
| if (requiresStroke && !SVGPaintServer::existsForRenderer(*this, style(), ApplyToStrokeMode))
|
| @@ -226,20 +226,18 @@ FloatRect RenderSVGShape::calculateStrokeBoundingBox() const
|
| ASSERT(m_path);
|
| FloatRect strokeBoundingBox = m_fillBoundingBox;
|
|
|
| - if (style()->svgStyle().hasStroke()) {
|
| - StrokeData strokeData;
|
| - SVGRenderSupport::applyStrokeStyleToStrokeData(&strokeData, style(), this);
|
| - if (hasNonScalingStroke()) {
|
| - AffineTransform nonScalingTransform = nonScalingStrokeTransform();
|
| - if (nonScalingTransform.isInvertible()) {
|
| - Path* usePath = nonScalingStrokePath(m_path.get(), nonScalingTransform);
|
| - FloatRect strokeBoundingRect = usePath->strokeBoundingRect(strokeData);
|
| - strokeBoundingRect = nonScalingTransform.inverse().mapRect(strokeBoundingRect);
|
| - strokeBoundingBox.unite(strokeBoundingRect);
|
| - }
|
| - } else {
|
| - strokeBoundingBox.unite(path().strokeBoundingRect(strokeData));
|
| + StrokeData strokeData;
|
| + SVGRenderSupport::applyStrokeStyleToStrokeData(&strokeData, style(), this);
|
| + if (hasNonScalingStroke()) {
|
| + AffineTransform nonScalingTransform = nonScalingStrokeTransform();
|
| + if (nonScalingTransform.isInvertible()) {
|
| + Path* usePath = nonScalingStrokePath(m_path.get(), nonScalingTransform);
|
| + FloatRect strokeBoundingRect = usePath->strokeBoundingRect(strokeData);
|
| + strokeBoundingRect = nonScalingTransform.inverse().mapRect(strokeBoundingRect);
|
| + strokeBoundingBox.unite(strokeBoundingRect);
|
| }
|
| + } else {
|
| + strokeBoundingBox.unite(path().strokeBoundingRect(strokeData));
|
| }
|
|
|
| return strokeBoundingBox;
|
| @@ -247,7 +245,7 @@ FloatRect RenderSVGShape::calculateStrokeBoundingBox() const
|
|
|
| void RenderSVGShape::updatePaintInvalidationBoundingBox()
|
| {
|
| - m_paintInvalidationBoundingBox = strokeBoundingBox();
|
| + m_paintInvalidationBoundingBox = actualStrokeBoundingBox();
|
| if (strokeWidth() < 1.0f && !m_paintInvalidationBoundingBox.isEmpty())
|
| m_paintInvalidationBoundingBox.inflate(1);
|
| SVGRenderSupport::intersectPaintInvalidationRectWithResources(this, m_paintInvalidationBoundingBox);
|
|
|