OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 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 20 matching lines...) Expand all Loading... |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 // Animated property definitions | 33 // Animated property definitions |
34 DEFINE_ANIMATED_BOOLEAN(SVGGElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) | 34 DEFINE_ANIMATED_BOOLEAN(SVGGElement, SVGNames::externalResourcesRequiredAttr, Ex
ternalResourcesRequired, externalResourcesRequired) |
35 | 35 |
36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGElement) | 36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGElement) |
37 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 37 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
39 END_REGISTER_ANIMATED_PROPERTIES | 39 END_REGISTER_ANIMATED_PROPERTIES |
40 | 40 |
41 SVGGElement::SVGGElement(const QualifiedName& tagName, Document* document, Const
ructionType constructionType) | 41 SVGGElement::SVGGElement(const QualifiedName& tagName, Document& document, Const
ructionType constructionType) |
42 : SVGGraphicsElement(tagName, document, constructionType) | 42 : SVGGraphicsElement(tagName, document, constructionType) |
43 { | 43 { |
44 ASSERT(hasTagName(SVGNames::gTag)); | 44 ASSERT(hasTagName(SVGNames::gTag)); |
45 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
46 registerAnimatedPropertiesForSVGGElement(); | 46 registerAnimatedPropertiesForSVGGElement(); |
47 } | 47 } |
48 | 48 |
49 PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Docume
nt* document) | 49 PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Docume
nt& document) |
50 { | 50 { |
51 return adoptRef(new SVGGElement(tagName, document)); | 51 return adoptRef(new SVGGElement(tagName, document)); |
52 } | 52 } |
53 | 53 |
54 bool SVGGElement::isSupportedAttribute(const QualifiedName& attrName) | 54 bool SVGGElement::isSupportedAttribute(const QualifiedName& attrName) |
55 { | 55 { |
56 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 56 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
57 if (supportedAttributes.isEmpty()) | 57 if (supportedAttributes.isEmpty()) |
58 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 58 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
59 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 59 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 | 99 |
100 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&) | 100 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&) |
101 { | 101 { |
102 // Unlike SVGElement::rendererIsNeeded(), we still create renderers, even if | 102 // Unlike SVGElement::rendererIsNeeded(), we still create renderers, even if |
103 // display is set to 'none' - which is special to SVG <g> container elements
. | 103 // display is set to 'none' - which is special to SVG <g> container elements
. |
104 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem
ent(); | 104 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem
ent(); |
105 } | 105 } |
106 | 106 |
107 } | 107 } |
OLD | NEW |