Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
[WebKit-https.git] / Source / WebCore / rendering / svg / SVGRenderTreeAsText.cpp
index 1619abc..8823bc6 100644 (file)
@@ -187,7 +187,7 @@ static void writeStyle(TextStream& ts, const RenderElement& renderer)
 
             SVGLengthContext lengthContext(&shape.graphicsElement());
             double dashOffset = lengthContext.valueForLength(svgStyle.strokeDashOffset());
-            double strokeWidth = lengthContext.valueForLength(svgStyle.strokeWidth());
+            double strokeWidth = lengthContext.valueForLength(style.strokeWidth());
             const auto& dashes = svgStyle.strokeDashArray();
 
             DashArray dashArray;
@@ -197,8 +197,8 @@ static void writeStyle(TextStream& ts, const RenderElement& renderer)
             writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f);
             writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0);
             writeIfNotDefault(ts, "miter limit", svgStyle.strokeMiterLimit(), 4.0f);
-            writeIfNotDefault(ts, "line cap", svgStyle.capStyle(), ButtCap);
-            writeIfNotDefault(ts, "line join", svgStyle.joinStyle(), MiterJoin);
+            writeIfNotDefault(ts, "line cap", style.capStyle(), ButtCap);
+            writeIfNotDefault(ts, "line join", style.joinStyle(), MiterJoin);
             writeIfNotDefault(ts, "dash offset", dashOffset, 0.0);
             if (!dashArray.isEmpty())
                 writeNameValuePair(ts, "dash array", dashArray);