| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 supportedAttributes.add(SVGNames::cxAttr); | 52 supportedAttributes.add(SVGNames::cxAttr); |
| 53 supportedAttributes.add(SVGNames::cyAttr); | 53 supportedAttributes.add(SVGNames::cyAttr); |
| 54 supportedAttributes.add(SVGNames::rxAttr); | 54 supportedAttributes.add(SVGNames::rxAttr); |
| 55 supportedAttributes.add(SVGNames::ryAttr); | 55 supportedAttributes.add(SVGNames::ryAttr); |
| 56 } | 56 } |
| 57 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 57 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 60 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
| 61 { | 61 { |
| 62 SVGParsingError parseError = NoError; | 62 parseAttributeNew(name, value); |
| 63 | |
| 64 if (!isSupportedAttribute(name)) | |
| 65 SVGGeometryElement::parseAttribute(name, value); | |
| 66 else if (name == SVGNames::cxAttr) | |
| 67 m_cx->setBaseValueAsString(value, parseError); | |
| 68 else if (name == SVGNames::cyAttr) | |
| 69 m_cy->setBaseValueAsString(value, parseError); | |
| 70 else if (name == SVGNames::rxAttr) | |
| 71 m_rx->setBaseValueAsString(value, parseError); | |
| 72 else if (name == SVGNames::ryAttr) | |
| 73 m_ry->setBaseValueAsString(value, parseError); | |
| 74 else | |
| 75 ASSERT_NOT_REACHED(); | |
| 76 | |
| 77 reportAttributeParsingError(parseError, name, value); | |
| 78 } | 63 } |
| 79 | 64 |
| 80 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) | 65 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) |
| 81 { | 66 { |
| 82 if (!isSupportedAttribute(attrName)) { | 67 if (!isSupportedAttribute(attrName)) { |
| 83 SVGGeometryElement::svgAttributeChanged(attrName); | 68 SVGGeometryElement::svgAttributeChanged(attrName); |
| 84 return; | 69 return; |
| 85 } | 70 } |
| 86 | 71 |
| 87 SVGElement::InvalidationGuard invalidationGuard(this); | 72 SVGElement::InvalidationGuard invalidationGuard(this); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 114 || m_rx->currentValue()->isRelative() | 99 || m_rx->currentValue()->isRelative() |
| 115 || m_ry->currentValue()->isRelative(); | 100 || m_ry->currentValue()->isRelative(); |
| 116 } | 101 } |
| 117 | 102 |
| 118 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) | 103 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) |
| 119 { | 104 { |
| 120 return new RenderSVGEllipse(this); | 105 return new RenderSVGEllipse(this); |
| 121 } | 106 } |
| 122 | 107 |
| 123 } | 108 } |
| OLD | NEW |