summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/svg/SVGFEMorphologyElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGFEMorphologyElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGFEMorphologyElement.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/WebCore/svg/SVGFEMorphologyElement.cpp b/Source/WebCore/svg/SVGFEMorphologyElement.cpp
index 1a44e3c..2b02b6a 100644
--- a/Source/WebCore/svg/SVGFEMorphologyElement.cpp
+++ b/Source/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -86,13 +86,27 @@ void SVGFEMorphologyElement::parseMappedAttribute(Attribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+bool SVGFEMorphologyElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
+{
+ FEMorphology* morphology = static_cast<FEMorphology*>(effect);
+ if (attrName == SVGNames::operatorAttr)
+ return morphology->setMorphologyOperator(static_cast<MorphologyOperatorType>(_operator()));
+ if (attrName == SVGNames::radiusAttr)
+ return (morphology->setRadiusX(radiusX()) || morphology->setRadiusY(radiusY()));
+
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- if (attrName == SVGNames::inAttr
- || attrName == SVGNames::operatorAttr
+ if (attrName == SVGNames::operatorAttr
|| attrName == SVGNames::radiusAttr)
+ primitiveAttributeChanged(attrName);
+
+ if (attrName == SVGNames::inAttr)
invalidate();
}