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 * | 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 23 matching lines...) Expand all Loading... |
34 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa
tioAttr, PreserveAspectRatio, preserveAspectRatio) | 34 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa
tioAttr, PreserveAspectRatio, preserveAspectRatio) |
35 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox) | 35 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox) |
36 | 36 |
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement) |
38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) |
41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
42 END_REGISTER_ANIMATED_PROPERTIES | 42 END_REGISTER_ANIMATED_PROPERTIES |
43 | 43 |
44 inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document
& document) | 44 inline SVGSymbolElement::SVGSymbolElement(Document& document) |
45 : SVGElement(tagName, document) | 45 : SVGElement(SVGNames::symbolTag, document) |
46 { | 46 { |
47 ASSERT(hasTagName(SVGNames::symbolTag)); | |
48 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
49 registerAnimatedPropertiesForSVGSymbolElement(); | 48 registerAnimatedPropertiesForSVGSymbolElement(); |
50 } | 49 } |
51 | 50 |
52 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagNa
me, Document& document) | 51 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(Document& document) |
53 { | 52 { |
54 return adoptRef(new SVGSymbolElement(tagName, document)); | 53 return adoptRef(new SVGSymbolElement(document)); |
55 } | 54 } |
56 | 55 |
57 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName) | 56 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName) |
58 { | 57 { |
59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
60 if (supportedAttributes.isEmpty()) { | 59 if (supportedAttributes.isEmpty()) { |
61 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 60 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
62 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); | 61 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); |
63 } | 62 } |
64 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 63 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 { | 96 { |
98 return hasAttribute(SVGNames::viewBoxAttr); | 97 return hasAttribute(SVGNames::viewBoxAttr); |
99 } | 98 } |
100 | 99 |
101 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*) | 100 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*) |
102 { | 101 { |
103 return new RenderSVGHiddenContainer(this); | 102 return new RenderSVGHiddenContainer(this); |
104 } | 103 } |
105 | 104 |
106 } | 105 } |
OLD | NEW |