OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os) | 83 void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os) |
84 { | 84 { |
85 *os << "AnimatableShapeValue@" << &animValue; | 85 *os << "AnimatableShapeValue@" << &animValue; |
86 } | 86 } |
87 | 87 |
88 void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os) | 88 void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os) |
89 { | 89 { |
90 *os << "AnimatableStrokeDasharrayList("; | 90 *os << "AnimatableStrokeDasharrayList("; |
91 RefPtrWillBeRawPtr<SVGLengthList> list = animValue.toSVGLengthList(); | 91 RefPtr<SVGDashArray> list = animValue.toSVGDashArray(1); |
92 size_t length = list->length(); | 92 size_t length = list->size(); |
93 for (size_t i = 0; i < length; ++i) { | 93 for (size_t i = 0; i < length; ++i) { |
94 *os << list->at(i)->valueAsString().utf8().data(); | 94 const Length& dashLength = list->at(i); |
| 95 PixelsAndPercent pixelsAndPercent = dashLength.pixelsAndPercent(); |
| 96 *os << pixelsAndPercent.pixels << '+'; |
| 97 *os << pixelsAndPercent.percent << '%'; |
| 98 |
95 if (i != length-1) | 99 if (i != length-1) |
96 *os << ", "; | 100 *os << ", "; |
97 } | 101 } |
98 *os << ")"; | 102 *os << ")"; |
99 } | 103 } |
100 | 104 |
101 void PrintTo(const AnimatableTransform& animTransform, ::std::ostream* os) | 105 void PrintTo(const AnimatableTransform& animTransform, ::std::ostream* os) |
102 { | 106 { |
103 TransformOperations ops = animTransform.transformOperations(); | 107 TransformOperations ops = animTransform.transformOperations(); |
104 | 108 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 PrintTo(toAnimatableTransform(animValue), os); | 200 PrintTo(toAnimatableTransform(animValue), os); |
197 else if (animValue.isUnknown()) | 201 else if (animValue.isUnknown()) |
198 PrintTo(toAnimatableUnknown(animValue), os); | 202 PrintTo(toAnimatableUnknown(animValue), os); |
199 else if (animValue.isVisibility()) | 203 else if (animValue.isVisibility()) |
200 PrintTo(toAnimatableVisibility(animValue), os); | 204 PrintTo(toAnimatableVisibility(animValue), os); |
201 else | 205 else |
202 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue
TestHelper.h"; | 206 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue
TestHelper.h"; |
203 } | 207 } |
204 | 208 |
205 } // namespace blink | 209 } // namespace blink |
OLD | NEW |