| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 return narrowPrecisionToFloat(simpleDuration().value()); | 265 return narrowPrecisionToFloat(simpleDuration().value()); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void SVGAnimationElement::beginElement() | 268 void SVGAnimationElement::beginElement() |
| 269 { | 269 { |
| 270 beginElementAt(0); | 270 beginElementAt(0); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void SVGAnimationElement::beginElementAt(float offset) | 273 void SVGAnimationElement::beginElementAt(float offset) |
| 274 { | 274 { |
| 275 if (!std::isfinite(offset)) | 275 ASSERT(std::isfinite(offset)); |
| 276 return; | |
| 277 SMILTime elapsed = this->elapsed(); | 276 SMILTime elapsed = this->elapsed(); |
| 278 addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); | 277 addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); |
| 279 } | 278 } |
| 280 | 279 |
| 281 void SVGAnimationElement::endElement() | 280 void SVGAnimationElement::endElement() |
| 282 { | 281 { |
| 283 endElementAt(0); | 282 endElementAt(0); |
| 284 } | 283 } |
| 285 | 284 |
| 286 void SVGAnimationElement::endElementAt(float offset) | 285 void SVGAnimationElement::endElementAt(float offset) |
| 287 { | 286 { |
| 288 if (!std::isfinite(offset)) | 287 ASSERT(std::isfinite(offset)); |
| 289 return; | |
| 290 SMILTime elapsed = this->elapsed(); | 288 SMILTime elapsed = this->elapsed(); |
| 291 addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); | 289 addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin); |
| 292 } | 290 } |
| 293 | 291 |
| 294 void SVGAnimationElement::updateAnimationMode() | 292 void SVGAnimationElement::updateAnimationMode() |
| 295 { | 293 { |
| 296 // http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues | 294 // http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues |
| 297 if (hasAttribute(SVGNames::valuesAttr)) | 295 if (hasAttribute(SVGNames::valuesAttr)) |
| 298 setAnimationMode(ValuesAnimation); | 296 setAnimationMode(ValuesAnimation); |
| 299 else if (!toValue().isEmpty()) | 297 else if (!toValue().isEmpty()) |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 SVGSMILElement::setAttributeName(attributeName); | 712 SVGSMILElement::setAttributeName(attributeName); |
| 715 checkInvalidCSSAttributeType(targetElement()); | 713 checkInvalidCSSAttributeType(targetElement()); |
| 716 } | 714 } |
| 717 | 715 |
| 718 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) | 716 void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target) |
| 719 { | 717 { |
| 720 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut
eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa
me()); | 718 m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attribut
eType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeNa
me()); |
| 721 } | 719 } |
| 722 | 720 |
| 723 } | 721 } |
| OLD | NEW |