OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 { | 79 { |
80 return adoptRef(new SVGPatternElement(tagName, document)); | 80 return adoptRef(new SVGPatternElement(tagName, document)); |
81 } | 81 } |
82 | 82 |
83 bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName) | 83 bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName) |
84 { | 84 { |
85 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 85 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
86 if (supportedAttributes.isEmpty()) { | 86 if (supportedAttributes.isEmpty()) { |
87 SVGURIReference::addSupportedAttributes(supportedAttributes); | 87 SVGURIReference::addSupportedAttributes(supportedAttributes); |
88 SVGTests::addSupportedAttributes(supportedAttributes); | 88 SVGTests::addSupportedAttributes(supportedAttributes); |
89 SVGLangSpace::addSupportedAttributes(supportedAttributes); | |
90 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 89 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
91 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); | 90 SVGFitToViewBox::addSupportedAttributes(supportedAttributes); |
92 supportedAttributes.add(SVGNames::patternUnitsAttr); | 91 supportedAttributes.add(SVGNames::patternUnitsAttr); |
93 supportedAttributes.add(SVGNames::patternContentUnitsAttr); | 92 supportedAttributes.add(SVGNames::patternContentUnitsAttr); |
94 supportedAttributes.add(SVGNames::patternTransformAttr); | 93 supportedAttributes.add(SVGNames::patternTransformAttr); |
95 supportedAttributes.add(SVGNames::xAttr); | 94 supportedAttributes.add(SVGNames::xAttr); |
96 supportedAttributes.add(SVGNames::yAttr); | 95 supportedAttributes.add(SVGNames::yAttr); |
97 supportedAttributes.add(SVGNames::widthAttr); | 96 supportedAttributes.add(SVGNames::widthAttr); |
98 supportedAttributes.add(SVGNames::heightAttr); | 97 supportedAttributes.add(SVGNames::heightAttr); |
99 } | 98 } |
(...skipping 25 matching lines...) Expand all Loading... |
125 } else if (name == SVGNames::xAttr) | 124 } else if (name == SVGNames::xAttr) |
126 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); | 125 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); |
127 else if (name == SVGNames::yAttr) | 126 else if (name == SVGNames::yAttr) |
128 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError))
; | 127 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError))
; |
129 else if (name == SVGNames::widthAttr) | 128 else if (name == SVGNames::widthAttr) |
130 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro
r, ForbidNegativeLengths)); | 129 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseErro
r, ForbidNegativeLengths)); |
131 else if (name == SVGNames::heightAttr) | 130 else if (name == SVGNames::heightAttr) |
132 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr
ror, ForbidNegativeLengths)); | 131 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseEr
ror, ForbidNegativeLengths)); |
133 else if (SVGURIReference::parseAttribute(name, value) | 132 else if (SVGURIReference::parseAttribute(name, value) |
134 || SVGTests::parseAttribute(name, value) | 133 || SVGTests::parseAttribute(name, value) |
135 || SVGLangSpace::parseAttribute(name, value) | |
136 || SVGExternalResourcesRequired::parseAttribute(name, value) | 134 || SVGExternalResourcesRequired::parseAttribute(name, value) |
137 || SVGFitToViewBox::parseAttribute(this, name, value)) { | 135 || SVGFitToViewBox::parseAttribute(this, name, value)) { |
138 } else | 136 } else |
139 ASSERT_NOT_REACHED(); | 137 ASSERT_NOT_REACHED(); |
140 | 138 |
141 reportAttributeParsingError(parseError, name, value); | 139 reportAttributeParsingError(parseError, name, value); |
142 } | 140 } |
143 | 141 |
144 void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName) | 142 void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName) |
145 { | 143 { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 239 |
242 bool SVGPatternElement::selfHasRelativeLengths() const | 240 bool SVGPatternElement::selfHasRelativeLengths() const |
243 { | 241 { |
244 return x().isRelative() | 242 return x().isRelative() |
245 || y().isRelative() | 243 || y().isRelative() |
246 || width().isRelative() | 244 || width().isRelative() |
247 || height().isRelative(); | 245 || height().isRelative(); |
248 } | 246 } |
249 | 247 |
250 } | 248 } |
OLD | NEW |