OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
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 23 matching lines...) Expand all Loading... |
34 DEFINE_ANIMATED_ENUMERATION(SVGFEColorMatrixElement, SVGNames::typeAttr, Type, t
ype, ColorMatrixType) | 34 DEFINE_ANIMATED_ENUMERATION(SVGFEColorMatrixElement, SVGNames::typeAttr, Type, t
ype, ColorMatrixType) |
35 DEFINE_ANIMATED_NUMBER_LIST(SVGFEColorMatrixElement, SVGNames::valuesAttr, Value
s, values) | 35 DEFINE_ANIMATED_NUMBER_LIST(SVGFEColorMatrixElement, SVGNames::valuesAttr, Value
s, values) |
36 | 36 |
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEColorMatrixElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEColorMatrixElement) |
38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(type) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(type) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(values) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(values) |
41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
42 END_REGISTER_ANIMATED_PROPERTIES | 42 END_REGISTER_ANIMATED_PROPERTIES |
43 | 43 |
44 inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tag
Name, Document* document) | 44 inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tag
Name, Document& document) |
45 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 45 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
46 , m_type(FECOLORMATRIX_TYPE_MATRIX) | 46 , m_type(FECOLORMATRIX_TYPE_MATRIX) |
47 { | 47 { |
48 ASSERT(hasTagName(SVGNames::feColorMatrixTag)); | 48 ASSERT(hasTagName(SVGNames::feColorMatrixTag)); |
49 ScriptWrappable::init(this); | 49 ScriptWrappable::init(this); |
50 registerAnimatedPropertiesForSVGFEColorMatrixElement(); | 50 registerAnimatedPropertiesForSVGFEColorMatrixElement(); |
51 } | 51 } |
52 | 52 |
53 PassRefPtr<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const Qualif
iedName& tagName, Document* document) | 53 PassRefPtr<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const Qualif
iedName& tagName, Document& document) |
54 { | 54 { |
55 return adoptRef(new SVGFEColorMatrixElement(tagName, document)); | 55 return adoptRef(new SVGFEColorMatrixElement(tagName, document)); |
56 } | 56 } |
57 | 57 |
58 bool SVGFEColorMatrixElement::isSupportedAttribute(const QualifiedName& attrName
) | 58 bool SVGFEColorMatrixElement::isSupportedAttribute(const QualifiedName& attrName
) |
59 { | 59 { |
60 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 60 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
61 if (supportedAttributes.isEmpty()) { | 61 if (supportedAttributes.isEmpty()) { |
62 supportedAttributes.add(SVGNames::typeAttr); | 62 supportedAttributes.add(SVGNames::typeAttr); |
63 supportedAttributes.add(SVGNames::valuesAttr); | 63 supportedAttributes.add(SVGNames::valuesAttr); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 filterValues = values.toFloatVector(); | 168 filterValues = values.toFloatVector(); |
169 } | 169 } |
170 | 170 |
171 RefPtr<FilterEffect> effect = FEColorMatrix::create(filter, filterType, filt
erValues); | 171 RefPtr<FilterEffect> effect = FEColorMatrix::create(filter, filterType, filt
erValues); |
172 effect->inputEffects().append(input1); | 172 effect->inputEffects().append(input1); |
173 return effect.release(); | 173 return effect.release(); |
174 } | 174 } |
175 | 175 |
176 } // namespace WebCore | 176 } // namespace WebCore |
OLD | NEW |