| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 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 23 matching lines...) Expand all Loading... |
| 34 // Animated property definitions | 34 // Animated property definitions |
| 35 DEFINE_ANIMATED_TRANSFORM_LIST(SVGGraphicsElement, SVGNames::transformAttr, Tran
sform, transform) | 35 DEFINE_ANIMATED_TRANSFORM_LIST(SVGGraphicsElement, SVGNames::transformAttr, Tran
sform, transform) |
| 36 | 36 |
| 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGraphicsElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 38 REGISTER_LOCAL_ANIMATED_PROPERTY(transform) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(transform) |
| 39 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement) | 39 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement) |
| 40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) | 40 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests) |
| 41 END_REGISTER_ANIMATED_PROPERTIES | 41 END_REGISTER_ANIMATED_PROPERTIES |
| 42 | 42 |
| 43 SVGGraphicsElement::SVGGraphicsElement(const QualifiedName& tagName, Document* d
ocument, ConstructionType constructionType) | 43 SVGGraphicsElement::SVGGraphicsElement(const QualifiedName& tagName, Document* d
ocument, ConstructionType constructionType) |
| 44 : SVGStyledLocatableElement(tagName, document, constructionType) | 44 : SVGStyledElement(tagName, document, constructionType) |
| 45 { | 45 { |
| 46 registerAnimatedPropertiesForSVGGraphicsElement(); | 46 registerAnimatedPropertiesForSVGGraphicsElement(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 SVGGraphicsElement::~SVGGraphicsElement() | 49 SVGGraphicsElement::~SVGGraphicsElement() |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 AffineTransform SVGGraphicsElement::getCTM(StyleUpdateStrategy styleUpdateStrate
gy) | 53 AffineTransform SVGGraphicsElement::getCTM(StyleUpdateStrategy styleUpdateStrate
gy) |
| 54 { | 54 { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 { | 94 { |
| 95 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 95 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 96 if (supportedAttributes.isEmpty()) | 96 if (supportedAttributes.isEmpty()) |
| 97 supportedAttributes.add(SVGNames::transformAttr); | 97 supportedAttributes.add(SVGNames::transformAttr); |
| 98 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 98 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | 101 void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) |
| 102 { | 102 { |
| 103 if (!isSupportedAttribute(name)) { | 103 if (!isSupportedAttribute(name)) { |
| 104 SVGStyledLocatableElement::parseAttribute(name, value); | 104 SVGStyledElement::parseAttribute(name, value); |
| 105 return; | 105 return; |
| 106 } | 106 } |
| 107 | 107 |
| 108 if (name == SVGNames::transformAttr) { | 108 if (name == SVGNames::transformAttr) { |
| 109 SVGTransformList newList; | 109 SVGTransformList newList; |
| 110 newList.parse(value); | 110 newList.parse(value); |
| 111 detachAnimatedTransformListWrappers(newList.size()); | 111 detachAnimatedTransformListWrappers(newList.size()); |
| 112 setTransformBaseValue(newList); | 112 setTransformBaseValue(newList); |
| 113 return; | 113 return; |
| 114 } | 114 } |
| 115 | 115 |
| 116 ASSERT_NOT_REACHED(); | 116 ASSERT_NOT_REACHED(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) | 119 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) |
| 120 { | 120 { |
| 121 if (!isSupportedAttribute(attrName)) { | 121 if (!isSupportedAttribute(attrName)) { |
| 122 SVGStyledLocatableElement::svgAttributeChanged(attrName); | 122 SVGStyledElement::svgAttributeChanged(attrName); |
| 123 return; | 123 return; |
| 124 } | 124 } |
| 125 | 125 |
| 126 SVGElementInstance::InvalidationGuard invalidationGuard(this); | 126 SVGElementInstance::InvalidationGuard invalidationGuard(this); |
| 127 | 127 |
| 128 RenderObject* object = renderer(); | 128 RenderObject* object = renderer(); |
| 129 if (!object) | 129 if (!object) |
| 130 return; | 130 return; |
| 131 | 131 |
| 132 if (attrName == SVGNames::transformAttr) { | 132 if (attrName == SVGNames::transformAttr) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 160 } | 160 } |
| 161 | 161 |
| 162 void SVGGraphicsElement::toClipPath(Path& path) | 162 void SVGGraphicsElement::toClipPath(Path& path) |
| 163 { | 163 { |
| 164 updatePathFromGraphicsElement(this, path); | 164 updatePathFromGraphicsElement(this, path); |
| 165 // FIXME: How do we know the element has done a layout? | 165 // FIXME: How do we know the element has done a layout? |
| 166 path.transform(animatedLocalTransform()); | 166 path.transform(animatedLocalTransform()); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } | 169 } |
| OLD | NEW |