OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 return entries; | 38 return entries; |
39 } | 39 } |
40 | 40 |
41 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) | 41 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) |
42 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) | 42 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) |
43 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) | 43 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) |
44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
45 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) | 45 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) |
46 { | 46 { |
47 ScriptWrappable::init(this); | |
48 | |
49 addToPropertyMap(m_radius); | 47 addToPropertyMap(m_radius); |
50 addToPropertyMap(m_in1); | 48 addToPropertyMap(m_in1); |
51 addToPropertyMap(m_svgOperator); | 49 addToPropertyMap(m_svgOperator); |
52 } | 50 } |
53 | 51 |
54 DEFINE_NODE_FACTORY(SVGFEMorphologyElement) | 52 DEFINE_NODE_FACTORY(SVGFEMorphologyElement) |
55 | 53 |
56 bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName) | 54 bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName) |
57 { | 55 { |
58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 56 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 132 |
135 if (xRadius < 0 || yRadius < 0) | 133 if (xRadius < 0 || yRadius < 0) |
136 return nullptr; | 134 return nullptr; |
137 | 135 |
138 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); | 136 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); |
139 effect->inputEffects().append(input1); | 137 effect->inputEffects().append(input1); |
140 return effect.release(); | 138 return effect.release(); |
141 } | 139 } |
142 | 140 |
143 } // namespace blink | 141 } // namespace blink |
OLD | NEW |