| Index: Source/core/layout/svg/LayoutSVGPath.cpp
|
| diff --git a/Source/core/layout/svg/LayoutSVGPath.cpp b/Source/core/layout/svg/LayoutSVGPath.cpp
|
| index 72ccd5e6427f4b16083c99380c8318393c0d6d8e..2d14461c137230652dbb042e1b3687562a1e4c11 100644
|
| --- a/Source/core/layout/svg/LayoutSVGPath.cpp
|
| +++ b/Source/core/layout/svg/LayoutSVGPath.cpp
|
| @@ -50,10 +50,24 @@ LayoutSVGPath::~LayoutSVGPath()
|
| void LayoutSVGPath::updateShapeFromElement()
|
| {
|
| LayoutSVGShape::updateShapeFromElement();
|
| - processMarkerPositions();
|
| updateZeroLengthSubpaths();
|
| +}
|
| +
|
| +void LayoutSVGPath::updateStrokeAndFillBoundingBoxes()
|
| +{
|
| + LayoutSVGShape::updateStrokeAndFillBoundingBoxes();
|
| +
|
| + // TODO(pdr): We should only call this in updateShapeFromElement.
|
| + processMarkerPositions();
|
| + if (!m_markerPositions.isEmpty())
|
| + m_strokeBoundingBox.unite(markerRect(strokeWidth()));
|
|
|
| - m_strokeBoundingBox = calculateUpdatedStrokeBoundingBox();
|
| + if (style()->svgStyle().hasStroke()) {
|
| + // FIXME: zero-length subpaths do not respect vector-effect = non-scaling-stroke.
|
| + float strokeWidth = this->strokeWidth();
|
| + for (size_t i = 0; i < m_zeroLengthLinecapLocations.size(); ++i)
|
| + m_strokeBoundingBox.unite(zeroLengthSubpathRect(m_zeroLengthLinecapLocations[i], strokeWidth));
|
| + }
|
| }
|
|
|
| FloatRect LayoutSVGPath::hitTestStrokeBoundingBox() const
|
| @@ -91,23 +105,6 @@ FloatRect LayoutSVGPath::hitTestStrokeBoundingBox() const
|
| return box;
|
| }
|
|
|
| -FloatRect LayoutSVGPath::calculateUpdatedStrokeBoundingBox() const
|
| -{
|
| - FloatRect strokeBoundingBox = m_strokeBoundingBox;
|
| -
|
| - if (!m_markerPositions.isEmpty())
|
| - strokeBoundingBox.unite(markerRect(strokeWidth()));
|
| -
|
| - if (style()->svgStyle().hasStroke()) {
|
| - // FIXME: zero-length subpaths do not respect vector-effect = non-scaling-stroke.
|
| - float strokeWidth = this->strokeWidth();
|
| - for (size_t i = 0; i < m_zeroLengthLinecapLocations.size(); ++i)
|
| - strokeBoundingBox.unite(zeroLengthSubpathRect(m_zeroLengthLinecapLocations[i], strokeWidth));
|
| - }
|
| -
|
| - return strokeBoundingBox;
|
| -}
|
| -
|
| bool LayoutSVGPath::shapeDependentStrokeContains(const FloatPoint& point)
|
| {
|
| if (LayoutSVGShape::shapeDependentStrokeContains(point))
|
|
|