| 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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 PassRefPtrWillBeRawPtr<SVGAnimateElement> SVGAnimateElement::create(Document& do
cument) | 43 PassRefPtrWillBeRawPtr<SVGAnimateElement> SVGAnimateElement::create(Document& do
cument) |
| 44 { | 44 { |
| 45 return adoptRefWillBeNoop(new SVGAnimateElement(SVGNames::animateTag, docume
nt)); | 45 return adoptRefWillBeNoop(new SVGAnimateElement(SVGNames::animateTag, docume
nt)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 SVGAnimateElement::~SVGAnimateElement() | 48 SVGAnimateElement::~SVGAnimateElement() |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool SVGAnimateElement::isSVGAnimationAttributeSettingJavaScriptURL(const Attrib
ute& attribute) const |
| 53 { |
| 54 if ((attribute.name() == SVGNames::fromAttr || attribute.name() == SVGNames:
:toAttr) && attributeValueIsJavaScriptURL(attribute)) |
| 55 return true; |
| 56 |
| 57 if (attribute.name() == SVGNames::valuesAttr) { |
| 58 Vector<String> parts; |
| 59 if (!parseValues(attribute.value(), parts)) { |
| 60 // Assume the worst. |
| 61 return true; |
| 62 } |
| 63 for (const auto& part : parts) { |
| 64 if (protocolIsJavaScript(part)) |
| 65 return true; |
| 66 } |
| 67 } |
| 68 |
| 69 return SVGSMILElement::isSVGAnimationAttributeSettingJavaScriptURL(attribute
); |
| 70 } |
| 71 |
| 52 AnimatedPropertyType SVGAnimateElement::animatedPropertyType() | 72 AnimatedPropertyType SVGAnimateElement::animatedPropertyType() |
| 53 { | 73 { |
| 54 if (!targetElement()) | 74 if (!targetElement()) |
| 55 return AnimatedUnknown; | 75 return AnimatedUnknown; |
| 56 | 76 |
| 57 m_animator.reset(targetElement()); | 77 m_animator.reset(targetElement()); |
| 58 return m_animator.type(); | 78 return m_animator.type(); |
| 59 } | 79 } |
| 60 | 80 |
| 61 bool SVGAnimateElement::hasValidAttributeType() | 81 bool SVGAnimateElement::hasValidAttributeType() |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 { | 410 { |
| 391 visitor->trace(m_fromProperty); | 411 visitor->trace(m_fromProperty); |
| 392 visitor->trace(m_toProperty); | 412 visitor->trace(m_toProperty); |
| 393 visitor->trace(m_toAtEndOfDurationProperty); | 413 visitor->trace(m_toAtEndOfDurationProperty); |
| 394 visitor->trace(m_animatedProperty); | 414 visitor->trace(m_animatedProperty); |
| 395 visitor->trace(m_animator); | 415 visitor->trace(m_animator); |
| 396 SVGAnimationElement::trace(visitor); | 416 SVGAnimationElement::trace(visitor); |
| 397 } | 417 } |
| 398 | 418 |
| 399 } | 419 } |
| OLD | NEW |