OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> | 3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> |
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 26 matching lines...) Expand all Loading... |
37 DEFINE_ANIMATED_STRING(SVGTextPathElement, XLinkNames::hrefAttr, Href, href) | 37 DEFINE_ANIMATED_STRING(SVGTextPathElement, XLinkNames::hrefAttr, Href, href) |
38 | 38 |
39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGTextPathElement) | 39 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGTextPathElement) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(startOffset) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(startOffset) |
41 REGISTER_LOCAL_ANIMATED_PROPERTY(method) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(method) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(spacing) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(spacing) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTextContentElement) | 44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTextContentElement) |
45 END_REGISTER_ANIMATED_PROPERTIES | 45 END_REGISTER_ANIMATED_PROPERTIES |
46 | 46 |
47 inline SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Docu
ment& document) | 47 inline SVGTextPathElement::SVGTextPathElement(Document& document) |
48 : SVGTextContentElement(tagName, document) | 48 : SVGTextContentElement(SVGNames::textPathTag, document) |
49 , m_startOffset(LengthModeOther) | 49 , m_startOffset(LengthModeOther) |
50 , m_method(SVGTextPathMethodAlign) | 50 , m_method(SVGTextPathMethodAlign) |
51 , m_spacing(SVGTextPathSpacingExact) | 51 , m_spacing(SVGTextPathSpacingExact) |
52 { | 52 { |
53 ASSERT(hasTagName(SVGNames::textPathTag)); | |
54 ScriptWrappable::init(this); | 53 ScriptWrappable::init(this); |
55 registerAnimatedPropertiesForSVGTextPathElement(); | 54 registerAnimatedPropertiesForSVGTextPathElement(); |
56 } | 55 } |
57 | 56 |
58 PassRefPtr<SVGTextPathElement> SVGTextPathElement::create(const QualifiedName& t
agName, Document& document) | 57 PassRefPtr<SVGTextPathElement> SVGTextPathElement::create(Document& document) |
59 { | 58 { |
60 return adoptRef(new SVGTextPathElement(tagName, document)); | 59 return adoptRef(new SVGTextPathElement(document)); |
61 } | 60 } |
62 | 61 |
63 SVGTextPathElement::~SVGTextPathElement() | 62 SVGTextPathElement::~SVGTextPathElement() |
64 { | 63 { |
65 clearResourceReferences(); | 64 clearResourceReferences(); |
66 } | 65 } |
67 | 66 |
68 void SVGTextPathElement::clearResourceReferences() | 67 void SVGTextPathElement::clearResourceReferences() |
69 { | 68 { |
70 document().accessSVGExtensions()->removeAllTargetReferencesForElement(this); | 69 document().accessSVGExtensions()->removeAllTargetReferencesForElement(this); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 clearResourceReferences(); | 188 clearResourceReferences(); |
190 } | 189 } |
191 | 190 |
192 bool SVGTextPathElement::selfHasRelativeLengths() const | 191 bool SVGTextPathElement::selfHasRelativeLengths() const |
193 { | 192 { |
194 return startOffsetCurrentValue().isRelative() | 193 return startOffsetCurrentValue().isRelative() |
195 || SVGTextContentElement::selfHasRelativeLengths(); | 194 || SVGTextContentElement::selfHasRelativeLengths(); |
196 } | 195 } |
197 | 196 |
198 } | 197 } |
OLD | NEW |