| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 m_angle(angle) {} | 51 m_angle(angle) {} |
| 52 | 52 |
| 53 SVGMarkerOrientEnumeration::~SVGMarkerOrientEnumeration() {} | 53 SVGMarkerOrientEnumeration::~SVGMarkerOrientEnumeration() {} |
| 54 | 54 |
| 55 DEFINE_TRACE(SVGMarkerOrientEnumeration) { | 55 DEFINE_TRACE(SVGMarkerOrientEnumeration) { |
| 56 visitor->trace(m_angle); | 56 visitor->trace(m_angle); |
| 57 SVGEnumeration<SVGMarkerOrientType>::trace(visitor); | 57 SVGEnumeration<SVGMarkerOrientType>::trace(visitor); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void SVGMarkerOrientEnumeration::notifyChange() { | 60 void SVGMarkerOrientEnumeration::notifyChange() { |
| 61 ASSERT(m_angle); | 61 DCHECK(m_angle); |
| 62 m_angle->orientTypeChanged(); | 62 m_angle->orientTypeChanged(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void SVGMarkerOrientEnumeration::add(SVGPropertyBase*, SVGElement*) { | 65 void SVGMarkerOrientEnumeration::add(SVGPropertyBase*, SVGElement*) { |
| 66 // SVGMarkerOrientEnumeration is only animated via SVGAngle | 66 // SVGMarkerOrientEnumeration is only animated via SVGAngle |
| 67 NOTREACHED(); | 67 NOTREACHED(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void SVGMarkerOrientEnumeration::calculateAnimatedValue( | 70 void SVGMarkerOrientEnumeration::calculateAnimatedValue( |
| 71 SVGAnimationElement*, | 71 SVGAnimationElement*, |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 m_orientType->setEnumValue(otherOrientType); | 384 m_orientType->setEnumValue(otherOrientType); |
| 385 } | 385 } |
| 386 | 386 |
| 387 void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, | 387 void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, |
| 388 float percentage, | 388 float percentage, |
| 389 unsigned repeatCount, | 389 unsigned repeatCount, |
| 390 SVGPropertyBase* from, | 390 SVGPropertyBase* from, |
| 391 SVGPropertyBase* to, | 391 SVGPropertyBase* to, |
| 392 SVGPropertyBase* toAtEndOfDuration, | 392 SVGPropertyBase* toAtEndOfDuration, |
| 393 SVGElement*) { | 393 SVGElement*) { |
| 394 ASSERT(animationElement); | 394 DCHECK(animationElement); |
| 395 bool isToAnimation = animationElement->getAnimationMode() == ToAnimation; | 395 bool isToAnimation = animationElement->getAnimationMode() == ToAnimation; |
| 396 | 396 |
| 397 SVGAngle* fromAngle = isToAnimation ? this : toSVGAngle(from); | 397 SVGAngle* fromAngle = isToAnimation ? this : toSVGAngle(from); |
| 398 SVGAngle* toAngle = toSVGAngle(to); | 398 SVGAngle* toAngle = toSVGAngle(to); |
| 399 SVGMarkerOrientType fromOrientType = fromAngle->orientType()->enumValue(); | 399 SVGMarkerOrientType fromOrientType = fromAngle->orientType()->enumValue(); |
| 400 SVGMarkerOrientType toOrientType = toAngle->orientType()->enumValue(); | 400 SVGMarkerOrientType toOrientType = toAngle->orientType()->enumValue(); |
| 401 | 401 |
| 402 if (fromOrientType != toOrientType) { | 402 if (fromOrientType != toOrientType) { |
| 403 // Fall back to discrete animation. | 403 // Fall back to discrete animation. |
| 404 assign(percentage < 0.5f ? *fromAngle : *toAngle); | 404 assign(percentage < 0.5f ? *fromAngle : *toAngle); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 void SVGAngle::orientTypeChanged() { | 441 void SVGAngle::orientTypeChanged() { |
| 442 if (orientType()->enumValue() == SVGMarkerOrientAuto || | 442 if (orientType()->enumValue() == SVGMarkerOrientAuto || |
| 443 orientType()->enumValue() == SVGMarkerOrientAutoStartReverse) { | 443 orientType()->enumValue() == SVGMarkerOrientAutoStartReverse) { |
| 444 m_unitType = kSvgAngletypeUnspecified; | 444 m_unitType = kSvgAngletypeUnspecified; |
| 445 m_valueInSpecifiedUnits = 0; | 445 m_valueInSpecifiedUnits = 0; |
| 446 } | 446 } |
| 447 } | 447 } |
| 448 | 448 |
| 449 } // namespace blink | 449 } // namespace blink |
| OLD | NEW |