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

Unified Diff: Source/core/animation/AnimatableValueTestHelper.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 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/animation/AnimatableValueTestHelper.cpp
diff --git a/Source/core/animation/AnimatableValueTestHelper.cpp b/Source/core/animation/AnimatableValueTestHelper.cpp
index da6958cfc219ad90c5eb4d684fde09915cb53c44..1dbea4284b3f2281941dfa01b83a0fab51ff1fbc 100644
--- a/Source/core/animation/AnimatableValueTestHelper.cpp
+++ b/Source/core/animation/AnimatableValueTestHelper.cpp
@@ -120,7 +120,7 @@ void PrintTo(const AnimatableRepeatable& animValue, ::std::ostream* os)
void PrintTo(const AnimatableSVGLength& animSVGLength, ::std::ostream* os)
{
*os << "AnimatableSVGLength("
- << animSVGLength.toSVGLength().valueAsString().utf8().data() << ")";
+ << animSVGLength.toSVGLength()->valueAsString().utf8().data() << ")";
}
void PrintTo(const AnimatableSVGPaint& animSVGPaint, ::std::ostream* os)
@@ -143,10 +143,11 @@ void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os)
void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os)
{
*os << "AnimatableStrokeDasharrayList(";
- const Vector<SVGLength> v = animValue.toSVGLengthVector();
- for (Vector<SVGLength>::const_iterator it = v.begin(); it != v.end(); ++it) {
- *os << it->valueAsString().utf8().data();
- if (it+1 != v.end())
+ RefPtr<SVGLengthList> list = animValue.toSVGLengthList();
+ size_t length = list->numberOfItems();
+ for (size_t i = 0; i < length; ++i) {
+ *os << list->at(i)->valueAsString().utf8().data();
+ if (i != length-1)
*os << ", ";
}
*os << ")";
« no previous file with comments | « Source/core/animation/AnimatableStrokeDasharrayListTest.cpp ('k') | Source/core/animation/AnimatableValueTestHelperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698