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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 79 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
80 if (supportedAttributes.isEmpty()) { | 80 if (supportedAttributes.isEmpty()) { |
81 SVGURIReference::addSupportedAttributes(supportedAttributes); | 81 SVGURIReference::addSupportedAttributes(supportedAttributes); |
82 supportedAttributes.add(SVGNames::startOffsetAttr); | 82 supportedAttributes.add(SVGNames::startOffsetAttr); |
83 supportedAttributes.add(SVGNames::methodAttr); | 83 supportedAttributes.add(SVGNames::methodAttr); |
84 supportedAttributes.add(SVGNames::spacingAttr); | 84 supportedAttributes.add(SVGNames::spacingAttr); |
85 } | 85 } |
86 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 86 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
87 } | 87 } |
88 | 88 |
89 void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | |
90 { | |
91 SVGParsingError parseError = NoError; | |
92 | |
93 if (!isSupportedAttribute(name)) | |
94 SVGTextContentElement::parseAttribute(name, value); | |
95 else if (name == SVGNames::startOffsetAttr) | |
96 m_startOffset->setBaseValueAsString(value, parseError); | |
97 else if (name == SVGNames::methodAttr) | |
98 m_method->setBaseValueAsString(value, parseError); | |
99 else if (name == SVGNames::spacingAttr) | |
100 m_spacing->setBaseValueAsString(value, parseError); | |
101 else if (SVGURIReference::parseAttribute(name, value, parseError)) { | |
102 } else | |
103 ASSERT_NOT_REACHED(); | |
104 | |
105 reportAttributeParsingError(parseError, name, value); | |
106 } | |
107 | |
108 void SVGTextPathElement::svgAttributeChanged(const QualifiedName& attrName) | 89 void SVGTextPathElement::svgAttributeChanged(const QualifiedName& attrName) |
109 { | 90 { |
110 if (!isSupportedAttribute(attrName)) { | 91 if (!isSupportedAttribute(attrName)) { |
111 SVGTextContentElement::svgAttributeChanged(attrName); | 92 SVGTextContentElement::svgAttributeChanged(attrName); |
112 return; | 93 return; |
113 } | 94 } |
114 | 95 |
115 SVGElement::InvalidationGuard invalidationGuard(this); | 96 SVGElement::InvalidationGuard invalidationGuard(this); |
116 | 97 |
117 if (SVGURIReference::isKnownAttribute(attrName)) { | 98 if (SVGURIReference::isKnownAttribute(attrName)) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 clearResourceReferences(); | 158 clearResourceReferences(); |
178 } | 159 } |
179 | 160 |
180 bool SVGTextPathElement::selfHasRelativeLengths() const | 161 bool SVGTextPathElement::selfHasRelativeLengths() const |
181 { | 162 { |
182 return m_startOffset->currentValue()->isRelative() | 163 return m_startOffset->currentValue()->isRelative() |
183 || SVGTextContentElement::selfHasRelativeLengths(); | 164 || SVGTextContentElement::selfHasRelativeLengths(); |
184 } | 165 } |
185 | 166 |
186 } // namespace blink | 167 } // namespace blink |
OLD | NEW |