| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGLineElement) | 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGLineElement) |
| 40 REGISTER_LOCAL_ANIMATED_PROPERTY(x1) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(x1) |
| 41 REGISTER_LOCAL_ANIMATED_PROPERTY(y1) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(y1) |
| 42 REGISTER_LOCAL_ANIMATED_PROPERTY(x2) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(x2) |
| 43 REGISTER_LOCAL_ANIMATED_PROPERTY(y2) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(y2) |
| 44 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
| 45 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 45 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 46 END_REGISTER_ANIMATED_PROPERTIES | 46 END_REGISTER_ANIMATED_PROPERTIES |
| 47 | 47 |
| 48 inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* do
cument) | 48 inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document& do
cument) |
| 49 : SVGGraphicsElement(tagName, document) | 49 : SVGGraphicsElement(tagName, document) |
| 50 , m_x1(LengthModeWidth) | 50 , m_x1(LengthModeWidth) |
| 51 , m_y1(LengthModeHeight) | 51 , m_y1(LengthModeHeight) |
| 52 , m_x2(LengthModeWidth) | 52 , m_x2(LengthModeWidth) |
| 53 , m_y2(LengthModeHeight) | 53 , m_y2(LengthModeHeight) |
| 54 { | 54 { |
| 55 ASSERT(hasTagName(SVGNames::lineTag)); | 55 ASSERT(hasTagName(SVGNames::lineTag)); |
| 56 ScriptWrappable::init(this); | 56 ScriptWrappable::init(this); |
| 57 registerAnimatedPropertiesForSVGLineElement(); | 57 registerAnimatedPropertiesForSVGLineElement(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName,
Document* document) | 60 PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName,
Document& document) |
| 61 { | 61 { |
| 62 return adoptRef(new SVGLineElement(tagName, document)); | 62 return adoptRef(new SVGLineElement(tagName, document)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName) | 65 bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName) |
| 66 { | 66 { |
| 67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 68 if (supportedAttributes.isEmpty()) { | 68 if (supportedAttributes.isEmpty()) { |
| 69 SVGLangSpace::addSupportedAttributes(supportedAttributes); | 69 SVGLangSpace::addSupportedAttributes(supportedAttributes); |
| 70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 bool SVGLineElement::selfHasRelativeLengths() const | 136 bool SVGLineElement::selfHasRelativeLengths() const |
| 137 { | 137 { |
| 138 return x1CurrentValue().isRelative() | 138 return x1CurrentValue().isRelative() |
| 139 || y1CurrentValue().isRelative() | 139 || y1CurrentValue().isRelative() |
| 140 || x2CurrentValue().isRelative() | 140 || x2CurrentValue().isRelative() |
| 141 || y2CurrentValue().isRelative(); | 141 || y2CurrentValue().isRelative(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } | 144 } |
| OLD | NEW |