| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 m_toPoint.x(), toPointAtEndOfDuration.x(), animatedX); | 220 m_toPoint.x(), toPointAtEndOfDuration.x(), animatedX); |
| 221 | 221 |
| 222 float animatedY = 0; | 222 float animatedY = 0; |
| 223 animateAdditiveNumber(percentage, repeatCount, m_fromPoint.y(), | 223 animateAdditiveNumber(percentage, repeatCount, m_fromPoint.y(), |
| 224 m_toPoint.y(), toPointAtEndOfDuration.y(), animatedY); | 224 m_toPoint.y(), toPointAtEndOfDuration.y(), animatedY); |
| 225 | 225 |
| 226 transform->translate(animatedX, animatedY); | 226 transform->translate(animatedX, animatedY); |
| 227 return; | 227 return; |
| 228 } | 228 } |
| 229 | 229 |
| 230 ASSERT(!m_animationPath.isEmpty()); | 230 DCHECK(!m_animationPath.isEmpty()); |
| 231 | 231 |
| 232 float positionOnPath = m_animationPath.length() * percentage; | 232 float positionOnPath = m_animationPath.length() * percentage; |
| 233 FloatPoint position; | 233 FloatPoint position; |
| 234 float angle; | 234 float angle; |
| 235 m_animationPath.pointAndNormalAtLength(positionOnPath, position, angle); | 235 m_animationPath.pointAndNormalAtLength(positionOnPath, position, angle); |
| 236 | 236 |
| 237 // Handle accumulate="sum". | 237 // Handle accumulate="sum". |
| 238 if (isAccumulated() && repeatCount) { | 238 if (isAccumulated() && repeatCount) { |
| 239 FloatPoint positionAtEndOfDuration = | 239 FloatPoint positionAtEndOfDuration = |
| 240 m_animationPath.pointAtLength(m_animationPath.length()); | 240 m_animationPath.pointAtLength(m_animationPath.length()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 259 return; | 259 return; |
| 260 | 260 |
| 261 AffineTransform* t = targetElement->animateMotionTransform(); | 261 AffineTransform* t = targetElement->animateMotionTransform(); |
| 262 if (!t) | 262 if (!t) |
| 263 return; | 263 return; |
| 264 | 264 |
| 265 // ...except in case where we have additional instances in <use> trees. | 265 // ...except in case where we have additional instances in <use> trees. |
| 266 const HeapHashSet<WeakMember<SVGElement>>& instances = | 266 const HeapHashSet<WeakMember<SVGElement>>& instances = |
| 267 targetElement->instancesForElement(); | 267 targetElement->instancesForElement(); |
| 268 for (SVGElement* shadowTreeElement : instances) { | 268 for (SVGElement* shadowTreeElement : instances) { |
| 269 ASSERT(shadowTreeElement); | 269 DCHECK(shadowTreeElement); |
| 270 AffineTransform* transform = shadowTreeElement->animateMotionTransform(); | 270 AffineTransform* transform = shadowTreeElement->animateMotionTransform(); |
| 271 if (!transform) | 271 if (!transform) |
| 272 continue; | 272 continue; |
| 273 transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f()); | 273 transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f()); |
| 274 if (LayoutObject* layoutObject = shadowTreeElement->layoutObject()) | 274 if (LayoutObject* layoutObject = shadowTreeElement->layoutObject()) |
| 275 invalidateForAnimateMotionTransformChange(*layoutObject); | 275 invalidateForAnimateMotionTransformChange(*layoutObject); |
| 276 } | 276 } |
| 277 } | 277 } |
| 278 | 278 |
| 279 float SVGAnimateMotionElement::calculateDistance(const String& fromString, | 279 float SVGAnimateMotionElement::calculateDistance(const String& fromString, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 299 LayoutObject& object) { | 299 LayoutObject& object) { |
| 300 object.setNeedsTransformUpdate(); | 300 object.setNeedsTransformUpdate(); |
| 301 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { | 301 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 302 // The transform paint property relies on the SVG transform value. | 302 // The transform paint property relies on the SVG transform value. |
| 303 object.setNeedsPaintPropertyUpdate(); | 303 object.setNeedsPaintPropertyUpdate(); |
| 304 } | 304 } |
| 305 markForLayoutAndParentResourceInvalidation(&object); | 305 markForLayoutAndParentResourceInvalidation(&object); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace blink | 308 } // namespace blink |
| OLD | NEW |