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

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.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/css/resolver/StyleBuilderConverter.cpp
diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
index d3cf95a1cc76cf57db3e96e72793973316684a06..eae848e2901b5fbec8422daf44a42fa1df53e817 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -804,14 +804,14 @@ float StyleBuilderConverter::convertSpacing(StyleResolverState& state, CSSValue*
return primitiveValue->computeLength<float>(state.cssToLengthConversionData());
}
-PassRefPtrWillBeRawPtr<SVGLengthList> StyleBuilderConverter::convertStrokeDasharray(StyleResolverState&, CSSValue* value)
+PassRefPtr<SVGDashArray> StyleBuilderConverter::convertStrokeDasharray(StyleResolverState& state, CSSValue* value)
{
if (!value->isValueList())
return SVGLayoutStyle::initialStrokeDashArray();
CSSValueList* dashes = toCSSValueList(value);
- RefPtrWillBeRawPtr<SVGLengthList> array = SVGLengthList::create();
+ RefPtr<SVGDashArray> array = SVGDashArray::create();
size_t length = dashes->length();
for (size_t i = 0; i < length; ++i) {
CSSValue* currValue = dashes->item(i);
@@ -819,7 +819,7 @@ PassRefPtrWillBeRawPtr<SVGLengthList> StyleBuilderConverter::convertStrokeDashar
continue;
CSSPrimitiveValue* dash = toCSSPrimitiveValue(dashes->item(i));
- array->append(SVGLength::fromCSSPrimitiveValue(dash));
+ array->append(convertLength(state, dash));
}
return array.release();

Powered by Google App Engine
This is Rietveld 408576698