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

Unified Diff: Source/core/css/SVGCSSComputedStyleDeclaration.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 7 years 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/SVGCSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
index c972f873786a8f359d067f07a9be69b7ec2d4613..d988b0fc981ae73c4e6f55d0028289ae716f22a9 100644
--- a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
@@ -46,15 +46,17 @@ static PassRefPtr<CSSPrimitiveValue> glyphOrientationToCSSPrimitiveValue(EGlyphO
}
}
-static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength>& dashes)
+static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(PassRefPtr<SVGLengthList> passDashes)
{
- if (dashes.isEmpty())
+ RefPtr<SVGLengthList> dashes = passDashes;
+
+ if (dashes->isEmpty())
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
- const Vector<SVGLength>::const_iterator end = dashes.end();
- for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != end; ++it)
- list->append(SVGLength::toCSSPrimitiveValue(*it));
+ size_t length = dashes->numberOfItems();
+ for (size_t i = 0; i < length; ++i)
+ list->append(SVGLength::toCSSPrimitiveValue(dashes->at(i)));
return list.release();
}

Powered by Google App Engine
This is Rietveld 408576698