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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 { | 44 { |
45 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 45 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
46 if (entries.isEmpty()) { | 46 if (entries.isEmpty()) { |
47 entries.append(std::make_pair(SVGTextPathSpacingUnknown, emptyString()))
; | 47 entries.append(std::make_pair(SVGTextPathSpacingUnknown, emptyString()))
; |
48 entries.append(std::make_pair(SVGTextPathSpacingAuto, "auto")); | 48 entries.append(std::make_pair(SVGTextPathSpacingAuto, "auto")); |
49 entries.append(std::make_pair(SVGTextPathSpacingExact, "exact")); | 49 entries.append(std::make_pair(SVGTextPathSpacingExact, "exact")); |
50 } | 50 } |
51 return entries; | 51 return entries; |
52 } | 52 } |
53 | 53 |
54 // Animated property definitions | |
55 | |
56 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGTextPathElement) | |
57 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTextContentElement) | |
58 END_REGISTER_ANIMATED_PROPERTIES | |
59 | |
60 inline SVGTextPathElement::SVGTextPathElement(Document& document) | 54 inline SVGTextPathElement::SVGTextPathElement(Document& document) |
61 : SVGTextContentElement(SVGNames::textPathTag, document) | 55 : SVGTextContentElement(SVGNames::textPathTag, document) |
62 , SVGURIReference(this) | 56 , SVGURIReference(this) |
63 , m_startOffset(SVGAnimatedLength::create(this, SVGNames::startOffsetAttr, S
VGLength::create(LengthModeOther))) | 57 , m_startOffset(SVGAnimatedLength::create(this, SVGNames::startOffsetAttr, S
VGLength::create(LengthModeOther))) |
64 , m_method(SVGAnimatedEnumeration<SVGTextPathMethodType>::create(this, SVGNa
mes::methodAttr, SVGTextPathMethodAlign)) | 58 , m_method(SVGAnimatedEnumeration<SVGTextPathMethodType>::create(this, SVGNa
mes::methodAttr, SVGTextPathMethodAlign)) |
65 , m_spacing(SVGAnimatedEnumeration<SVGTextPathSpacingType>::create(this, SVG
Names::spacingAttr, SVGTextPathSpacingExact)) | 59 , m_spacing(SVGAnimatedEnumeration<SVGTextPathSpacingType>::create(this, SVG
Names::spacingAttr, SVGTextPathSpacingExact)) |
66 { | 60 { |
67 ScriptWrappable::init(this); | 61 ScriptWrappable::init(this); |
68 | 62 |
69 addToPropertyMap(m_startOffset); | 63 addToPropertyMap(m_startOffset); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 clearResourceReferences(); | 185 clearResourceReferences(); |
192 } | 186 } |
193 | 187 |
194 bool SVGTextPathElement::selfHasRelativeLengths() const | 188 bool SVGTextPathElement::selfHasRelativeLengths() const |
195 { | 189 { |
196 return m_startOffset->currentValue()->isRelative() | 190 return m_startOffset->currentValue()->isRelative() |
197 || SVGTextContentElement::selfHasRelativeLengths(); | 191 || SVGTextContentElement::selfHasRelativeLengths(); |
198 } | 192 } |
199 | 193 |
200 } | 194 } |
OLD | NEW |