OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(Animated
NewProperty)); | 236 OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(Animated
NewProperty)); |
237 animatedType->m_newProperty = newProperty; | 237 animatedType->m_newProperty = newProperty; |
238 return animatedType.release(); | 238 return animatedType.release(); |
239 } | 239 } |
240 | 240 |
241 String SVGAnimatedType::valueAsString() | 241 String SVGAnimatedType::valueAsString() |
242 { | 242 { |
243 switch (m_type) { | 243 switch (m_type) { |
244 case AnimatedColor: | 244 case AnimatedColor: |
245 ASSERT(m_data.color); | 245 ASSERT(m_data.color); |
246 return m_data.color->serialized(); | 246 return m_data.color->serializedAsCSSComponentValue(); |
247 case AnimatedLength: | 247 case AnimatedLength: |
248 ASSERT(m_data.length); | 248 ASSERT(m_data.length); |
249 return m_data.length->valueAsString(); | 249 return m_data.length->valueAsString(); |
250 case AnimatedLengthList: | 250 case AnimatedLengthList: |
251 ASSERT(m_data.lengthList); | 251 ASSERT(m_data.lengthList); |
252 return m_data.lengthList->valueAsString(); | 252 return m_data.lengthList->valueAsString(); |
253 case AnimatedNumber: | 253 case AnimatedNumber: |
254 ASSERT(m_data.number); | 254 ASSERT(m_data.number); |
255 return String::number(*m_data.number); | 255 return String::number(*m_data.number); |
256 case AnimatedRect: | 256 case AnimatedRect: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return true; | 337 return true; |
338 } | 338 } |
339 | 339 |
340 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type) | 340 bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type) |
341 { | 341 { |
342 // AnimatedColor is only used for CSS property animations. | 342 // AnimatedColor is only used for CSS property animations. |
343 return type != AnimatedUnknown && type != AnimatedColor; | 343 return type != AnimatedUnknown && type != AnimatedColor; |
344 } | 344 } |
345 | 345 |
346 } // namespace WebCore | 346 } // namespace WebCore |
OLD | NEW |