| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 float animatedY = 0; | 271 float animatedY = 0; |
| 272 animateAdditiveNumber(percentage, repeatCount, m_fromPoint.y(), m_toPoin
t.y(), toPointAtEndOfDuration.y(), animatedY); | 272 animateAdditiveNumber(percentage, repeatCount, m_fromPoint.y(), m_toPoin
t.y(), toPointAtEndOfDuration.y(), animatedY); |
| 273 | 273 |
| 274 transform->translate(animatedX, animatedY); | 274 transform->translate(animatedX, animatedY); |
| 275 return; | 275 return; |
| 276 } | 276 } |
| 277 | 277 |
| 278 ASSERT(!m_animationPath.isEmpty()); | 278 ASSERT(!m_animationPath.isEmpty()); |
| 279 | 279 |
| 280 bool ok = false; | |
| 281 float positionOnPath = m_animationPath.length() * percentage; | 280 float positionOnPath = m_animationPath.length() * percentage; |
| 282 FloatPoint position; | 281 FloatPoint position; |
| 283 float angle; | 282 float angle; |
| 284 ok = m_animationPath.pointAndNormalAtLength(positionOnPath, position, angle)
; | 283 bool ok = m_animationPath.pointAndNormalAtLength(positionOnPath, position, a
ngle); |
| 285 if (!ok) | 284 if (!ok) |
| 286 return; | 285 return; |
| 287 | 286 |
| 288 // Handle accumulate="sum". | 287 // Handle accumulate="sum". |
| 289 if (isAccumulated() && repeatCount) { | 288 if (isAccumulated() && repeatCount) { |
| 290 FloatPoint positionAtEndOfDuration = m_animationPath.pointAtLength(m_ani
mationPath.length(), ok); | 289 FloatPoint positionAtEndOfDuration = m_animationPath.pointAtLength(m_ani
mationPath.length(), ok); |
| 291 if (ok) | 290 if (ok) |
| 292 position.move(positionAtEndOfDuration.x() * repeatCount, positionAtE
ndOfDuration.y() * repeatCount); | 291 position.move(positionAtEndOfDuration.x() * repeatCount, positionAtE
ndOfDuration.y() * repeatCount); |
| 293 } | 292 } |
| 294 | 293 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 345 |
| 347 void SVGAnimateMotionElement::updateAnimationMode() | 346 void SVGAnimateMotionElement::updateAnimationMode() |
| 348 { | 347 { |
| 349 if (!m_animationPath.isEmpty()) | 348 if (!m_animationPath.isEmpty()) |
| 350 setAnimationMode(PathAnimation); | 349 setAnimationMode(PathAnimation); |
| 351 else | 350 else |
| 352 SVGAnimationElement::updateAnimationMode(); | 351 SVGAnimationElement::updateAnimationMode(); |
| 353 } | 352 } |
| 354 | 353 |
| 355 } | 354 } |
| OLD | NEW |