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 13 matching lines...) Expand all Loading... |
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 | 33 // Animated property definitions |
34 DEFINE_ANIMATED_STRING(SVGForeignObjectElement, XLinkNames::hrefAttr, Href, href
) | |
35 | 34 |
36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) | 35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGForeignObjectElement) |
37 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | |
38 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
39 END_REGISTER_ANIMATED_PROPERTIES | 37 END_REGISTER_ANIMATED_PROPERTIES |
40 | 38 |
41 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) | 39 inline SVGForeignObjectElement::SVGForeignObjectElement(Document& document) |
42 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) | 40 : SVGGraphicsElement(SVGNames::foreignObjectTag, document) |
43 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) | 41 , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(Len
gthModeWidth))) |
44 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) | 42 , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(Len
gthModeHeight))) |
45 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) | 43 , m_width(SVGAnimatedLength::create(this, SVGNames::widthAttr, SVGLength::cr
eate(LengthModeWidth))) |
46 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) | 44 , m_height(SVGAnimatedLength::create(this, SVGNames::heightAttr, SVGLength::
create(LengthModeHeight))) |
47 { | 45 { |
48 ScriptWrappable::init(this); | 46 ScriptWrappable::init(this); |
49 | 47 |
50 addToPropertyMap(m_x); | 48 addToPropertyMap(m_x); |
51 addToPropertyMap(m_y); | 49 addToPropertyMap(m_y); |
52 addToPropertyMap(m_width); | 50 addToPropertyMap(m_width); |
53 addToPropertyMap(m_height); | 51 addToPropertyMap(m_height); |
54 | |
55 registerAnimatedPropertiesForSVGForeignObjectElement(); | 52 registerAnimatedPropertiesForSVGForeignObjectElement(); |
56 } | 53 } |
57 | 54 |
58 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(Document& do
cument) | 55 PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(Document& do
cument) |
59 { | 56 { |
60 return adoptRef(new SVGForeignObjectElement(document)); | 57 return adoptRef(new SVGForeignObjectElement(document)); |
61 } | 58 } |
62 | 59 |
63 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName
) | 60 bool SVGForeignObjectElement::isSupportedAttribute(const QualifiedName& attrName
) |
64 { | 61 { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 135 |
139 bool SVGForeignObjectElement::selfHasRelativeLengths() const | 136 bool SVGForeignObjectElement::selfHasRelativeLengths() const |
140 { | 137 { |
141 return m_x->currentValue()->isRelative() | 138 return m_x->currentValue()->isRelative() |
142 || m_y->currentValue()->isRelative() | 139 || m_y->currentValue()->isRelative() |
143 || m_width->currentValue()->isRelative() | 140 || m_width->currentValue()->isRelative() |
144 || m_height->currentValue()->isRelative(); | 141 || m_height->currentValue()->isRelative(); |
145 } | 142 } |
146 | 143 |
147 } | 144 } |
OLD | NEW |