| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) | 43 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) |
| 44 REGISTER_LOCAL_ANIMATED_PROPERTY(x) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(x) |
| 45 REGISTER_LOCAL_ANIMATED_PROPERTY(y) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(y) |
| 46 REGISTER_LOCAL_ANIMATED_PROPERTY(width) | 46 REGISTER_LOCAL_ANIMATED_PROPERTY(width) |
| 47 REGISTER_LOCAL_ANIMATED_PROPERTY(height) | 47 REGISTER_LOCAL_ANIMATED_PROPERTY(height) |
| 48 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 48 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
| 49 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 49 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
| 50 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 50 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 51 END_REGISTER_ANIMATED_PROPERTIES | 51 END_REGISTER_ANIMATED_PROPERTIES |
| 52 | 52 |
| 53 inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tag
Name, Document* document) | 53 inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tag
Name, Document& document) |
| 54 : SVGGraphicsElement(tagName, document) | 54 : SVGGraphicsElement(tagName, document) |
| 55 , m_x(LengthModeWidth) | 55 , m_x(LengthModeWidth) |
| 56 , m_y(LengthModeHeight) | 56 , m_y(LengthModeHeight) |
| 57 , m_width(LengthModeWidth) | 57 , m_width(LengthModeWidth) |
| 58 , m_height(LengthModeHeight) | 58 , m_height(LengthModeHeight) |
| 59 { | 59 { |
| 60 ASSERT(hasTagName(SVGNames::foreignObjectTag)); | 60 ASSERT(hasTagName(SVGNames::foreignObjectTag)); |
| 61 ScriptWrappable::init(this); | 61 ScriptWrappable::init(this); |
| 62 registerAnimatedPropertiesForSVGForeignObjectElement(); | 62 registerAnimatedPropertiesForSVGForeignObjectElement(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const Qualif
iedName& tagName, Document* document) | 65 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const Qualif
iedName& tagName, Document& document) |
| 66 { | 66 { |
| 67 return adoptRef(new SVGForeignObjectElement(tagName, document)); | 67 return adoptRef(new SVGForeignObjectElement(tagName, document)); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName
) | 70 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName
) |
| 71 { | 71 { |
| 72 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 72 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 73 if (supportedAttributes.isEmpty()) { | 73 if (supportedAttributes.isEmpty()) { |
| 74 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 74 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
| 75 supportedAttributes.add(SVGNames::xAttr); | 75 supportedAttributes.add(SVGNames::xAttr); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 158 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
| 159 { | 159 { |
| 160 return xCurrentValue().isRelative() | 160 return xCurrentValue().isRelative() |
| 161 || yCurrentValue().isRelative() | 161 || yCurrentValue().isRelative() |
| 162 || widthCurrentValue().isRelative() | 162 || widthCurrentValue().isRelative() |
| 163 || heightCurrentValue().isRelative(); | 163 || heightCurrentValue().isRelative(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } | 166 } |
| OLD | NEW |