| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SVGLangSpace::addSupportedAttributes(supportedAttributes); | |
| 59 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 58 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
| 60 } | |
| 61 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 59 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 62 } | 60 } |
| 63 | 61 |
| 64 void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString&
value) | 62 void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString&
value) |
| 65 { | 63 { |
| 66 if (!isSupportedAttribute(name)) { | 64 if (!isSupportedAttribute(name)) { |
| 67 SVGGraphicsElement::parseAttribute(name, value); | 65 SVGGraphicsElement::parseAttribute(name, value); |
| 68 return; | 66 return; |
| 69 } | 67 } |
| 70 | 68 |
| 71 if (SVGLangSpace::parseAttribute(name, value)) | 69 if (SVGLangSpace::parseAttribute(name, value)) |
| 72 return; | 70 return; |
| 73 if (SVGExternalResourcesRequired::parseAttribute(name, value)) | |
| 74 return; | |
| 75 | 71 |
| 76 ASSERT_NOT_REACHED(); | 72 ASSERT_NOT_REACHED(); |
| 77 } | 73 } |
| 78 | 74 |
| 79 void SVGGElement::svgAttributeChanged(const QualifiedName& attrName) | 75 void SVGGElement::svgAttributeChanged(const QualifiedName& attrName) |
| 80 { | 76 { |
| 81 if (!isSupportedAttribute(attrName)) { | 77 if (!isSupportedAttribute(attrName)) { |
| 82 SVGGraphicsElement::svgAttributeChanged(attrName); | 78 SVGGraphicsElement::svgAttributeChanged(attrName); |
| 83 return; | 79 return; |
| 84 } | 80 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 102 } | 98 } |
| 103 | 99 |
| 104 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&) | 100 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&) |
| 105 { | 101 { |
| 106 // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, e
ven if | 102 // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, e
ven if |
| 107 // 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
. |
| 108 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem
ent(); | 104 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem
ent(); |
| 109 } | 105 } |
| 110 | 106 |
| 111 } | 107 } |
| OLD | NEW |