| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 if (supportedAttributes.isEmpty()) { | 49 if (supportedAttributes.isEmpty()) { |
| 50 supportedAttributes.add(SVGNames::cxAttr); | 50 supportedAttributes.add(SVGNames::cxAttr); |
| 51 supportedAttributes.add(SVGNames::cyAttr); | 51 supportedAttributes.add(SVGNames::cyAttr); |
| 52 supportedAttributes.add(SVGNames::rAttr); | 52 supportedAttributes.add(SVGNames::rAttr); |
| 53 } | 53 } |
| 54 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 54 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 57 void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
| 58 { | 58 { |
| 59 SVGParsingError parseError = NoError; | 59 parseAttributeNew(name, value); |
| 60 | |
| 61 if (!isSupportedAttribute(name)) | |
| 62 SVGGeometryElement::parseAttribute(name, value); | |
| 63 else if (name == SVGNames::cxAttr) | |
| 64 m_cx->setBaseValueAsString(value, parseError); | |
| 65 else if (name == SVGNames::cyAttr) | |
| 66 m_cy->setBaseValueAsString(value, parseError); | |
| 67 else if (name == SVGNames::rAttr) | |
| 68 m_r->setBaseValueAsString(value, parseError); | |
| 69 else | |
| 70 ASSERT_NOT_REACHED(); | |
| 71 | |
| 72 reportAttributeParsingError(parseError, name, value); | |
| 73 } | 60 } |
| 74 | 61 |
| 75 void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) | 62 void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) |
| 76 { | 63 { |
| 77 if (!isSupportedAttribute(attrName)) { | 64 if (!isSupportedAttribute(attrName)) { |
| 78 SVGGeometryElement::svgAttributeChanged(attrName); | 65 SVGGeometryElement::svgAttributeChanged(attrName); |
| 79 return; | 66 return; |
| 80 } | 67 } |
| 81 | 68 |
| 82 SVGElement::InvalidationGuard invalidationGuard(this); | 69 SVGElement::InvalidationGuard invalidationGuard(this); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 107 || m_cy->currentValue()->isRelative() | 94 || m_cy->currentValue()->isRelative() |
| 108 || m_r->currentValue()->isRelative(); | 95 || m_r->currentValue()->isRelative(); |
| 109 } | 96 } |
| 110 | 97 |
| 111 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) | 98 RenderObject* SVGCircleElement::createRenderer(RenderStyle*) |
| 112 { | 99 { |
| 113 return new RenderSVGEllipse(this); | 100 return new RenderSVGEllipse(this); |
| 114 } | 101 } |
| 115 | 102 |
| 116 } | 103 } |
| OLD | NEW |