| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include "XLinkNames.h" | 24 #include "XLinkNames.h" |
| 25 #include "core/rendering/svg/RenderSVGForeignObject.h" | 25 #include "core/rendering/svg/RenderSVGForeignObject.h" |
| 26 #include "core/rendering/svg/RenderSVGResource.h" | 26 #include "core/rendering/svg/RenderSVGResource.h" |
| 27 #include "core/svg/SVGElementInstance.h" | 27 #include "core/svg/SVGElementInstance.h" |
| 28 #include "core/svg/SVGLength.h" | 28 #include "core/svg/SVGLength.h" |
| 29 #include "wtf/Assertions.h" | 29 #include "wtf/Assertions.h" |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 // Animated property definitions | |
| 34 | |
| 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) | |
| 36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | |
| 37 END_REGISTER_ANIMATED_PROPERTIES | |
| 38 | |
| 39 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) | 33 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) |
| 40 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) | 34 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) |
| 41 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) | 35 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) |
| 42 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) | 36 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) |
| 43 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) | 37 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) |
| 44 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) | 38 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) |
| 45 { | 39 { |
| 46 ScriptWrappable::init(this); | 40 ScriptWrappable::init(this); |
| 47 | 41 |
| 48 addToPropertyMap(m_x); | 42 addToPropertyMap(m_x); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 128 |
| 135 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 129 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
| 136 { | 130 { |
| 137 return m_x->currentValue()->isRelative() | 131 return m_x->currentValue()->isRelative() |
| 138 || m_y->currentValue()->isRelative() | 132 || m_y->currentValue()->isRelative() |
| 139 || m_width->currentValue()->isRelative() | 133 || m_width->currentValue()->isRelative() |
| 140 || m_height->currentValue()->isRelative(); | 134 || m_height->currentValue()->isRelative(); |
| 141 } | 135 } |
| 142 | 136 |
| 143 } | 137 } |
| OLD | NEW |