OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Animated property definitions | 33 // Animated property definitions |
34 DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href) | 34 DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href) |
35 DEFINE_ANIMATED_BOOLEAN(SVGMPathElement, SVGNames::externalResourcesRequiredAttr
, ExternalResourcesRequired, externalResourcesRequired) | 35 DEFINE_ANIMATED_BOOLEAN(SVGMPathElement, SVGNames::externalResourcesRequiredAttr
, ExternalResourcesRequired, externalResourcesRequired) |
36 | 36 |
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMPathElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMPathElement) |
38 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
40 END_REGISTER_ANIMATED_PROPERTIES | 40 END_REGISTER_ANIMATED_PROPERTIES |
41 | 41 |
42 inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document&
document) | 42 inline SVGMPathElement::SVGMPathElement(Document& document) |
43 : SVGElement(tagName, document) | 43 : SVGElement(SVGNames::mpathTag, document) |
44 { | 44 { |
45 ASSERT(hasTagName(SVGNames::mpathTag)); | |
46 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
47 registerAnimatedPropertiesForSVGMPathElement(); | 46 registerAnimatedPropertiesForSVGMPathElement(); |
48 } | 47 } |
49 | 48 |
50 PassRefPtr<SVGMPathElement> SVGMPathElement::create(const QualifiedName& tagName
, Document& document) | 49 PassRefPtr<SVGMPathElement> SVGMPathElement::create(Document& document) |
51 { | 50 { |
52 return adoptRef(new SVGMPathElement(tagName, document)); | 51 return adoptRef(new SVGMPathElement(document)); |
53 } | 52 } |
54 | 53 |
55 SVGMPathElement::~SVGMPathElement() | 54 SVGMPathElement::~SVGMPathElement() |
56 { | 55 { |
57 clearResourceReferences(); | 56 clearResourceReferences(); |
58 } | 57 } |
59 | 58 |
60 void SVGMPathElement::buildPendingResource() | 59 void SVGMPathElement::buildPendingResource() |
61 { | 60 { |
62 clearResourceReferences(); | 61 clearResourceReferences(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 notifyParentOfPathChange(parentNode()); | 161 notifyParentOfPathChange(parentNode()); |
163 } | 162 } |
164 | 163 |
165 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) | 164 void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent) |
166 { | 165 { |
167 if (parent && parent->hasTagName(SVGNames::animateMotionTag)) | 166 if (parent && parent->hasTagName(SVGNames::animateMotionTag)) |
168 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath(); | 167 static_cast<SVGAnimateMotionElement*>(parent)->updateAnimationPath(); |
169 } | 168 } |
170 | 169 |
171 } // namespace WebCore | 170 } // namespace WebCore |
OLD | NEW |