| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 supportedAttributes.add(SVGNames::xAttr); | 56 supportedAttributes.add(SVGNames::xAttr); |
| 57 supportedAttributes.add(SVGNames::yAttr); | 57 supportedAttributes.add(SVGNames::yAttr); |
| 58 supportedAttributes.add(SVGNames::widthAttr); | 58 supportedAttributes.add(SVGNames::widthAttr); |
| 59 supportedAttributes.add(SVGNames::heightAttr); | 59 supportedAttributes.add(SVGNames::heightAttr); |
| 60 } | 60 } |
| 61 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 61 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const At
omicString& value) | 64 void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const At
omicString& value) |
| 65 { | 65 { |
| 66 SVGParsingError parseError = NoError; | 66 parseAttributeNew(name, value); |
| 67 | |
| 68 if (!isSupportedAttribute(name)) | |
| 69 SVGGraphicsElement::parseAttribute(name, value); | |
| 70 else if (name == SVGNames::xAttr) | |
| 71 m_x->setBaseValueAsString(value, parseError); | |
| 72 else if (name == SVGNames::yAttr) | |
| 73 m_y->setBaseValueAsString(value, parseError); | |
| 74 else if (name == SVGNames::widthAttr) | |
| 75 m_width->setBaseValueAsString(value, parseError); | |
| 76 else if (name == SVGNames::heightAttr) | |
| 77 m_height->setBaseValueAsString(value, parseError); | |
| 78 else | |
| 79 ASSERT_NOT_REACHED(); | |
| 80 | |
| 81 reportAttributeParsingError(parseError, name, value); | |
| 82 } | 67 } |
| 83 | 68 |
| 84 bool SVGForeignObjectElement::isPresentationAttribute(const QualifiedName& name)
const | 69 bool SVGForeignObjectElement::isPresentationAttribute(const QualifiedName& name)
const |
| 85 { | 70 { |
| 86 if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) | 71 if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) |
| 87 return true; | 72 return true; |
| 88 return SVGGraphicsElement::isPresentationAttribute(name); | 73 return SVGGraphicsElement::isPresentationAttribute(name); |
| 89 } | 74 } |
| 90 | 75 |
| 91 void SVGForeignObjectElement::collectStyleForPresentationAttribute(const Qualifi
edName& name, const AtomicString& value, MutableStylePropertySet* style) | 76 void SVGForeignObjectElement::collectStyleForPresentationAttribute(const Qualifi
edName& name, const AtomicString& value, MutableStylePropertySet* style) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 141 |
| 157 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 142 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
| 158 { | 143 { |
| 159 return m_x->currentValue()->isRelative() | 144 return m_x->currentValue()->isRelative() |
| 160 || m_y->currentValue()->isRelative() | 145 || m_y->currentValue()->isRelative() |
| 161 || m_width->currentValue()->isRelative() | 146 || m_width->currentValue()->isRelative() |
| 162 || m_height->currentValue()->isRelative(); | 147 || m_height->currentValue()->isRelative(); |
| 163 } | 148 } |
| 164 | 149 |
| 165 } | 150 } |
| OLD | NEW |