Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 | 24 |
| 25 #include "SVGNames.h" | 25 #include "SVGNames.h" |
| 26 #include "core/rendering/svg/RenderSVGHiddenContainer.h" | 26 #include "core/rendering/svg/RenderSVGHiddenContainer.h" |
| 27 #include "core/rendering/svg/RenderSVGResource.h" | 27 #include "core/rendering/svg/RenderSVGResource.h" |
| 28 #include "core/rendering/svg/RenderSVGTransformableContainer.h" | 28 #include "core/rendering/svg/RenderSVGTransformableContainer.h" |
| 29 #include "core/svg/SVGElementInstance.h" | 29 #include "core/svg/SVGElementInstance.h" |
| 30 | 30 |
| 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) | |
| 35 | 34 |
| 36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGElement) | 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGElement) |
| 37 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | |
| 38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 39 END_REGISTER_ANIMATED_PROPERTIES | 37 END_REGISTER_ANIMATED_PROPERTIES |
| 40 | 38 |
| 41 SVGGElement::SVGGElement(const QualifiedName& tagName, Document& document, Const ructionType constructionType) | 39 SVGGElement::SVGGElement(const QualifiedName& tagName, Document& document, Const ructionType constructionType) |
| 42 : SVGGraphicsElement(tagName, document, constructionType) | 40 : SVGGraphicsElement(tagName, document, constructionType) |
| 43 { | 41 { |
| 44 ASSERT(hasTagName(SVGNames::gTag)); | 42 ASSERT(hasTagName(SVGNames::gTag)); |
| 45 ScriptWrappable::init(this); | 43 ScriptWrappable::init(this); |
| 46 registerAnimatedPropertiesForSVGGElement(); | 44 registerAnimatedPropertiesForSVGGElement(); |
| 47 } | 45 } |
| 48 | 46 |
| 49 PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Docume nt& document) | 47 PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Docume nt& document) |
| 50 { | 48 { |
| 51 return adoptRef(new SVGGElement(tagName, document)); | 49 return adoptRef(new SVGGElement(tagName, document)); |
| 52 } | 50 } |
| 53 | 51 |
| 54 bool SVGGElement::isSupportedAttribute(const QualifiedName& attrName) | 52 bool SVGGElement::isSupportedAttribute(const QualifiedName& attrName) |
|
Stephen Chennney
2013/11/06 16:45:43
This can just return false now. If it's a virtual
Erik Dahlström (inactive)
2013/11/07 09:38:04
Actually it was buggy before, it should have had S
| |
| 55 { | 53 { |
| 56 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 54 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 57 if (supportedAttributes.isEmpty()) | |
| 58 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes ); | |
| 59 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 55 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 60 } | 56 } |
| 61 | 57 |
| 62 void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) | 58 void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) |
| 63 { | 59 { |
| 64 if (!isSupportedAttribute(name)) { | 60 if (!isSupportedAttribute(name)) { |
| 65 SVGGraphicsElement::parseAttribute(name, value); | 61 SVGGraphicsElement::parseAttribute(name, value); |
| 66 return; | 62 return; |
| 67 } | 63 } |
| 68 | 64 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 98 } | 94 } |
| 99 | 95 |
| 100 bool SVGGElement::rendererIsNeeded(const RenderStyle&) | 96 bool SVGGElement::rendererIsNeeded(const RenderStyle&) |
| 101 { | 97 { |
| 102 // Unlike SVGElement::rendererIsNeeded(), we still create renderers, even if | 98 // Unlike SVGElement::rendererIsNeeded(), we still create renderers, even if |
| 103 // display is set to 'none' - which is special to SVG <g> container elements . | 99 // display is set to 'none' - which is special to SVG <g> container elements . |
| 104 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem ent(); | 100 return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElem ent(); |
| 105 } | 101 } |
| 106 | 102 |
| 107 } | 103 } |
| OLD | NEW |