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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 PrintTo(*(it->get()), os); | 113 PrintTo(*(it->get()), os); |
114 if (it+1 != v.end()) | 114 if (it+1 != v.end()) |
115 *os << ", "; | 115 *os << ", "; |
116 } | 116 } |
117 *os << ")"; | 117 *os << ")"; |
118 } | 118 } |
119 | 119 |
120 void PrintTo(const AnimatableSVGLength& animSVGLength, ::std::ostream* os) | 120 void PrintTo(const AnimatableSVGLength& animSVGLength, ::std::ostream* os) |
121 { | 121 { |
122 *os << "AnimatableSVGLength(" | 122 *os << "AnimatableSVGLength(" |
123 << animSVGLength.toSVGLength().valueAsString().utf8().data() << ")"; | 123 << animSVGLength.toSVGLength()->valueAsString().utf8().data() << ")"; |
124 } | 124 } |
125 | 125 |
126 void PrintTo(const AnimatableSVGPaint& animSVGPaint, ::std::ostream* os) | 126 void PrintTo(const AnimatableSVGPaint& animSVGPaint, ::std::ostream* os) |
127 { | 127 { |
128 *os << "AnimatableSVGPaint("; | 128 *os << "AnimatableSVGPaint("; |
129 if (animSVGPaint.paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR) | 129 if (animSVGPaint.paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR) |
130 *os << animSVGPaint.color().serialized().utf8().data(); | 130 *os << animSVGPaint.color().serialized().utf8().data(); |
131 else if (animSVGPaint.paintType() == SVGPaint::SVG_PAINTTYPE_URI) | 131 else if (animSVGPaint.paintType() == SVGPaint::SVG_PAINTTYPE_URI) |
132 *os << "url(" << animSVGPaint.uri().utf8().data() << ")"; | 132 *os << "url(" << animSVGPaint.uri().utf8().data() << ")"; |
133 else | 133 else |
134 *os << animSVGPaint.paintType(); | 134 *os << animSVGPaint.paintType(); |
135 *os << ")"; | 135 *os << ")"; |
136 } | 136 } |
137 | 137 |
138 void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os) | 138 void PrintTo(const AnimatableShapeValue& animValue, ::std::ostream* os) |
139 { | 139 { |
140 *os << "AnimatableShapeValue@" << &animValue; | 140 *os << "AnimatableShapeValue@" << &animValue; |
141 } | 141 } |
142 | 142 |
143 void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os) | 143 void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os) |
144 { | 144 { |
145 *os << "AnimatableStrokeDasharrayList("; | 145 *os << "AnimatableStrokeDasharrayList("; |
146 const Vector<SVGLength> v = animValue.toSVGLengthVector(); | 146 RefPtr<SVGLengthList> list = animValue.toSVGLengthList(); |
147 for (Vector<SVGLength>::const_iterator it = v.begin(); it != v.end(); ++it)
{ | 147 size_t length = list->numberOfItems(); |
148 *os << it->valueAsString().utf8().data(); | 148 for (size_t i = 0; i < length; ++i) { |
149 if (it+1 != v.end()) | 149 *os << list->at(i)->valueAsString().utf8().data(); |
| 150 if (i != length-1) |
150 *os << ", "; | 151 *os << ", "; |
151 } | 152 } |
152 *os << ")"; | 153 *os << ")"; |
153 } | 154 } |
154 | 155 |
155 void PrintTo(const AnimatableTransform& animTransform, ::std::ostream* os) | 156 void PrintTo(const AnimatableTransform& animTransform, ::std::ostream* os) |
156 { | 157 { |
157 TransformOperations ops = animTransform.transformOperations(); | 158 TransformOperations ops = animTransform.transformOperations(); |
158 | 159 |
159 *os << "AnimatableTransform("; | 160 *os << "AnimatableTransform("; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 PrintTo(*(toAnimatableTransform(&animValue)), os); | 261 PrintTo(*(toAnimatableTransform(&animValue)), os); |
261 else if (animValue.isUnknown()) | 262 else if (animValue.isUnknown()) |
262 PrintTo(*(toAnimatableUnknown(&animValue)), os); | 263 PrintTo(*(toAnimatableUnknown(&animValue)), os); |
263 else if (animValue.isVisibility()) | 264 else if (animValue.isVisibility()) |
264 PrintTo(*(toAnimatableVisibility(&animValue)), os); | 265 PrintTo(*(toAnimatableVisibility(&animValue)), os); |
265 else | 266 else |
266 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue
TestHelper.h"; | 267 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue
TestHelper.h"; |
267 } | 268 } |
268 | 269 |
269 } // namespace WebCore | 270 } // namespace WebCore |
OLD | NEW |