| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 supportedAttributes.add(SVGNames::widthAttr); | 58 supportedAttributes.add(SVGNames::widthAttr); |
| 59 supportedAttributes.add(SVGNames::heightAttr); | 59 supportedAttributes.add(SVGNames::heightAttr); |
| 60 supportedAttributes.add(SVGNames::rxAttr); | 60 supportedAttributes.add(SVGNames::rxAttr); |
| 61 supportedAttributes.add(SVGNames::ryAttr); | 61 supportedAttributes.add(SVGNames::ryAttr); |
| 62 } | 62 } |
| 63 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 63 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) | 66 void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) |
| 67 { | 67 { |
| 68 SVGParsingError parseError = NoError; | 68 parseAttributeNew(name, value); |
| 69 | |
| 70 if (!isSupportedAttribute(name)) | |
| 71 SVGGeometryElement::parseAttribute(name, value); | |
| 72 else if (name == SVGNames::xAttr) | |
| 73 m_x->setBaseValueAsString(value, parseError); | |
| 74 else if (name == SVGNames::yAttr) | |
| 75 m_y->setBaseValueAsString(value, parseError); | |
| 76 else if (name == SVGNames::rxAttr) | |
| 77 m_rx->setBaseValueAsString(value, parseError); | |
| 78 else if (name == SVGNames::ryAttr) | |
| 79 m_ry->setBaseValueAsString(value, parseError); | |
| 80 else if (name == SVGNames::widthAttr) | |
| 81 m_width->setBaseValueAsString(value, parseError); | |
| 82 else if (name == SVGNames::heightAttr) | |
| 83 m_height->setBaseValueAsString(value, parseError); | |
| 84 else | |
| 85 ASSERT_NOT_REACHED(); | |
| 86 | |
| 87 reportAttributeParsingError(parseError, name, value); | |
| 88 } | 69 } |
| 89 | 70 |
| 90 void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) | 71 void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) |
| 91 { | 72 { |
| 92 if (!isSupportedAttribute(attrName)) { | 73 if (!isSupportedAttribute(attrName)) { |
| 93 SVGGeometryElement::svgAttributeChanged(attrName); | 74 SVGGeometryElement::svgAttributeChanged(attrName); |
| 94 return; | 75 return; |
| 95 } | 76 } |
| 96 | 77 |
| 97 SVGElement::InvalidationGuard invalidationGuard(this); | 78 SVGElement::InvalidationGuard invalidationGuard(this); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 128 || m_rx->currentValue()->isRelative() | 109 || m_rx->currentValue()->isRelative() |
| 129 || m_ry->currentValue()->isRelative(); | 110 || m_ry->currentValue()->isRelative(); |
| 130 } | 111 } |
| 131 | 112 |
| 132 RenderObject* SVGRectElement::createRenderer(RenderStyle*) | 113 RenderObject* SVGRectElement::createRenderer(RenderStyle*) |
| 133 { | 114 { |
| 134 return new RenderSVGRect(this); | 115 return new RenderSVGRect(this); |
| 135 } | 116 } |
| 136 | 117 |
| 137 } | 118 } |
| OLD | NEW |