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

Unified Diff: Source/core/animation/animatable/AnimatableValueTestHelper.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/animation/animatable/AnimatableValueTestHelper.cpp
diff --git a/Source/core/animation/animatable/AnimatableValueTestHelper.cpp b/Source/core/animation/animatable/AnimatableValueTestHelper.cpp
index 5b02a045c3d8f9f2e1bc9c0b7d0fe4492121ea12..a6972956deb2559ead0aa41bd3deb85c5d029fef 100644
--- a/Source/core/animation/animatable/AnimatableValueTestHelper.cpp
+++ b/Source/core/animation/animatable/AnimatableValueTestHelper.cpp
@@ -88,10 +88,14 @@ void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os)
void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os)
{
*os << "AnimatableStrokeDasharrayList(";
- RefPtrWillBeRawPtr<SVGLengthList> list = animValue.toSVGLengthList();
- size_t length = list->length();
+ RefPtr<SVGDashArray> list = animValue.toSVGDashArray(1);
+ size_t length = list->size();
for (size_t i = 0; i < length; ++i) {
- *os << list->at(i)->valueAsString().utf8().data();
+ const Length& dashLength = list->at(i);
+ PixelsAndPercent pixelsAndPercent = dashLength.pixelsAndPercent();
+ *os << pixelsAndPercent.pixels << '+';
+ *os << pixelsAndPercent.percent << '%';
+
if (i != length-1)
*os << ", ";
}

Powered by Google App Engine
This is Rietveld 408576698