OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 52 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
53 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 53 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
54 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement) | 54 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement) |
55 END_REGISTER_ANIMATED_PROPERTIES | 55 END_REGISTER_ANIMATED_PROPERTIES |
56 | 56 |
57 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* d
ocument) | 57 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* d
ocument) |
58 : SVGStyledElement(tagName, document) | 58 : SVGStyledElement(tagName, document) |
59 , m_spreadMethod(SVGSpreadMethodPad) | 59 , m_spreadMethod(SVGSpreadMethodPad) |
60 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) | 60 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) |
61 { | 61 { |
| 62 ScriptWrappable::init(this); |
62 registerAnimatedPropertiesForSVGGradientElement(); | 63 registerAnimatedPropertiesForSVGGradientElement(); |
63 } | 64 } |
64 | 65 |
65 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) | 66 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) |
66 { | 67 { |
67 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 68 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
68 if (supportedAttributes.isEmpty()) { | 69 if (supportedAttributes.isEmpty()) { |
69 SVGURIReference::addSupportedAttributes(supportedAttributes); | 70 SVGURIReference::addSupportedAttributes(supportedAttributes); |
70 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 71 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
71 supportedAttributes.add(SVGNames::gradientUnitsAttr); | 72 supportedAttributes.add(SVGNames::gradientUnitsAttr); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 162 |
162 stops.append(Gradient::ColorStop(offset, r, g, b, a)); | 163 stops.append(Gradient::ColorStop(offset, r, g, b, a)); |
163 } | 164 } |
164 | 165 |
165 return stops; | 166 return stops; |
166 } | 167 } |
167 | 168 |
168 } | 169 } |
169 | 170 |
170 #endif // ENABLE(SVG) | 171 #endif // ENABLE(SVG) |
OLD | NEW |