Index: third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h |
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h b/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h |
index 20527e24b7041c21c56f2aac63ba1219d957010a..4dcb7005afc01bd2700199dae89d3ef62bb9c148 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGMarkerData.h |
@@ -106,14 +106,17 @@ class SVGMarkerData { |
return 0; |
} |
- void updateOutslope(const FloatPoint& point) { |
+ void updateOutslope(const PathElement& element) { |
m_outslopePoints[0] = m_origin; |
+ FloatPoint point = element.type == PathElementCloseSubpath |
+ ? m_subpathStart |
+ : element.points[0]; |
m_outslopePoints[1] = point; |
} |
void updateFromPathElement(const PathElement& element) { |
// First update the outslope for the previous element. |
- updateOutslope(element.points[0]); |
+ updateOutslope(element); |
// Record the marker for the previous element. |
if (m_elementIndex > 0) { |
@@ -148,7 +151,7 @@ class SVGMarkerData { |
m_origin = points[0]; |
break; |
case PathElementCloseSubpath: |
- updateInslope(points[0]); |
+ updateInslope(m_subpathStart); |
m_origin = m_subpathStart; |
m_subpathStart = FloatPoint(); |
} |