OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 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 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGEllipseElement) | 40 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGEllipseElement) |
41 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(cx) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(cy) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(rx) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(rx) |
44 REGISTER_LOCAL_ANIMATED_PROPERTY(ry) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(ry) |
45 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
47 END_REGISTER_ANIMATED_PROPERTIES | 47 END_REGISTER_ANIMATED_PROPERTIES |
48 | 48 |
49 inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Docume
nt& document) | 49 inline SVGEllipseElement::SVGEllipseElement(Document& document) |
50 : SVGGeometryElement(tagName, document) | 50 : SVGGeometryElement(SVGNames::ellipseTag, document) |
51 , m_cx(LengthModeWidth) | 51 , m_cx(LengthModeWidth) |
52 , m_cy(LengthModeHeight) | 52 , m_cy(LengthModeHeight) |
53 , m_rx(LengthModeWidth) | 53 , m_rx(LengthModeWidth) |
54 , m_ry(LengthModeHeight) | 54 , m_ry(LengthModeHeight) |
55 { | 55 { |
56 ASSERT(hasTagName(SVGNames::ellipseTag)); | |
57 ScriptWrappable::init(this); | 56 ScriptWrappable::init(this); |
58 registerAnimatedPropertiesForSVGEllipseElement(); | 57 registerAnimatedPropertiesForSVGEllipseElement(); |
59 } | 58 } |
60 | 59 |
61 PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tag
Name, Document& document) | 60 PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(Document& document) |
62 { | 61 { |
63 return adoptRef(new SVGEllipseElement(tagName, document)); | 62 return adoptRef(new SVGEllipseElement(document)); |
64 } | 63 } |
65 | 64 |
66 bool SVGEllipseElement::isSupportedAttribute(const QualifiedName& attrName) | 65 bool SVGEllipseElement::isSupportedAttribute(const QualifiedName& attrName) |
67 { | 66 { |
68 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
69 if (supportedAttributes.isEmpty()) { | 68 if (supportedAttributes.isEmpty()) { |
70 SVGLangSpace::addSupportedAttributes(supportedAttributes); | 69 SVGLangSpace::addSupportedAttributes(supportedAttributes); |
71 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
72 supportedAttributes.add(SVGNames::cxAttr); | 71 supportedAttributes.add(SVGNames::cxAttr); |
73 supportedAttributes.add(SVGNames::cyAttr); | 72 supportedAttributes.add(SVGNames::cyAttr); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 || rxCurrentValue().isRelative() | 140 || rxCurrentValue().isRelative() |
142 || ryCurrentValue().isRelative(); | 141 || ryCurrentValue().isRelative(); |
143 } | 142 } |
144 | 143 |
145 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) | 144 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) |
146 { | 145 { |
147 return new RenderSVGEllipse(this); | 146 return new RenderSVGEllipse(this); |
148 } | 147 } |
149 | 148 |
150 } | 149 } |
OLD | NEW |