Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Unified Diff: Source/core/layout/svg/SVGLayoutTreeAsText.cpp

Issue 975733002: Use Length for the stroke-dasharray property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test for style-change responsive-ness. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/svg/SVGLayoutTreeAsText.cpp
diff --git a/Source/core/layout/svg/SVGLayoutTreeAsText.cpp b/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
index adf29b023ebf7d2683fb94c6289cd12dcc06aeb7..e7c8c49731f7ff74948d4c23cd28794b8940bdac 100644
--- a/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
+++ b/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
@@ -290,13 +290,7 @@ static void writeStyle(TextStream& ts, const LayoutObject& object)
SVGLengthContext lengthContext(shape.element());
double dashOffset = lengthContext.valueForLength(svgStyle.strokeDashOffset(), style);
double strokeWidth = svgStyle.strokeWidth()->value(lengthContext);
- RefPtrWillBeRawPtr<SVGLengthList> dashes = svgStyle.strokeDashArray();
-
- DashArray dashArray;
- SVGLengthList::ConstIterator it = dashes->begin();
- SVGLengthList::ConstIterator itEnd = dashes->end();
- for (; it != itEnd; ++it)
- dashArray.append(it->value(lengthContext));
+ DashArray dashArray = SVGLayoutSupport::resolveSVGDashArray(*svgStyle.strokeDashArray(), style, lengthContext);
writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f);
writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0);

Powered by Google App Engine
This is Rietveld 408576698