| 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 12 matching lines...) Expand all Loading... |
| 23 #include "core/svg/SVGSymbolElement.h" | 23 #include "core/svg/SVGSymbolElement.h" |
| 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/svg/SVGElementInstance.h" | 27 #include "core/svg/SVGElementInstance.h" |
| 28 | 28 |
| 29 namespace WebCore { | 29 namespace WebCore { |
| 30 | 30 |
| 31 // Animated property definitions | 31 // Animated property definitions |
| 32 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa
tioAttr, PreserveAspectRatio, preserveAspectRatio) | 32 DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGSymbolElement, SVGNames::preserveAspectRa
tioAttr, PreserveAspectRatio, preserveAspectRatio) |
| 33 DEFINE_ANIMATED_RECT(SVGSymbolElement, SVGNames::viewBoxAttr, ViewBox, viewBox) | |
| 34 | 33 |
| 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement) | 34 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGSymbolElement) |
| 36 REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox) | |
| 37 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) | 35 REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio) |
| 38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | 36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
| 39 END_REGISTER_ANIMATED_PROPERTIES | 37 END_REGISTER_ANIMATED_PROPERTIES |
| 40 | 38 |
| 41 inline SVGSymbolElement::SVGSymbolElement(Document& document) | 39 inline SVGSymbolElement::SVGSymbolElement(Document& document) |
| 42 : SVGElement(SVGNames::symbolTag, document) | 40 : SVGElement(SVGNames::symbolTag, document) |
| 41 , m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr)) |
| 43 { | 42 { |
| 44 ScriptWrappable::init(this); | 43 ScriptWrappable::init(this); |
| 44 |
| 45 addToPropertyMap(m_viewBox); |
| 45 registerAnimatedPropertiesForSVGSymbolElement(); | 46 registerAnimatedPropertiesForSVGSymbolElement(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(Document& document) | 49 PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(Document& document) |
| 49 { | 50 { |
| 50 return adoptRef(new SVGSymbolElement(document)); | 51 return adoptRef(new SVGSymbolElement(document)); |
| 51 } | 52 } |
| 52 | 53 |
| 53 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName) | 54 bool SVGSymbolElement::isSupportedAttribute(const QualifiedName& attrName) |
| 54 { | 55 { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 { | 91 { |
| 91 return hasAttribute(SVGNames::viewBoxAttr); | 92 return hasAttribute(SVGNames::viewBoxAttr); |
| 92 } | 93 } |
| 93 | 94 |
| 94 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*) | 95 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*) |
| 95 { | 96 { |
| 96 return new RenderSVGHiddenContainer(this); | 97 return new RenderSVGHiddenContainer(this); |
| 97 } | 98 } |
| 98 | 99 |
| 99 } | 100 } |
| OLD | NEW |