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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) | 74 bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) |
75 { | 75 { |
76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 76 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
77 if (supportedAttributes.isEmpty()) { | 77 if (supportedAttributes.isEmpty()) { |
78 SVGURIReference::addSupportedAttributes(supportedAttributes); | 78 SVGURIReference::addSupportedAttributes(supportedAttributes); |
79 supportedAttributes.add(SVGNames::startOffsetAttr); | 79 supportedAttributes.add(SVGNames::startOffsetAttr); |
80 supportedAttributes.add(SVGNames::methodAttr); | 80 supportedAttributes.add(SVGNames::methodAttr); |
81 supportedAttributes.add(SVGNames::spacingAttr); | 81 supportedAttributes.add(SVGNames::spacingAttr); |
82 } | 82 } |
83 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 83 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
84 } | 84 } |
85 | 85 |
86 void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | 86 void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) |
87 { | 87 { |
88 SVGParsingError parseError = NoError; | 88 SVGParsingError parseError = NoError; |
89 | 89 |
90 if (!isSupportedAttribute(name)) | 90 if (!isSupportedAttribute(name)) |
91 SVGTextContentElement::parseAttribute(name, value); | 91 SVGTextContentElement::parseAttribute(name, value); |
92 else if (name == SVGNames::startOffsetAttr) | 92 else if (name == SVGNames::startOffsetAttr) |
93 setStartOffsetBaseValue(SVGLength::construct(LengthModeOther, value, par
seError)); | 93 setStartOffsetBaseValue(SVGLength::construct(LengthModeOther, value, par
seError)); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 clearResourceReferences(); | 191 clearResourceReferences(); |
192 } | 192 } |
193 | 193 |
194 bool SVGTextPathElement::selfHasRelativeLengths() const | 194 bool SVGTextPathElement::selfHasRelativeLengths() const |
195 { | 195 { |
196 return startOffset().isRelative() | 196 return startOffset().isRelative() |
197 || SVGTextContentElement::selfHasRelativeLengths(); | 197 || SVGTextContentElement::selfHasRelativeLengths(); |
198 } | 198 } |
199 | 199 |
200 } | 200 } |
OLD | NEW |