diff options
Diffstat (limited to 'Source/WebCore/svg/SVGFEDisplacementMapElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGFEDisplacementMapElement.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp index b5f2e32..873f85a 100644 --- a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp +++ b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp @@ -79,15 +79,31 @@ void SVGFEDisplacementMapElement::parseMappedAttribute(Attribute* attr) SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr); } +bool SVGFEDisplacementMapElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName) +{ + FEDisplacementMap* displacementMap = static_cast<FEDisplacementMap*>(effect); + if (attrName == SVGNames::xChannelSelectorAttr) + return displacementMap->setXChannelSelector(static_cast<ChannelSelectorType>(xChannelSelector())); + if (attrName == SVGNames::yChannelSelectorAttr) + return displacementMap->setYChannelSelector(static_cast<ChannelSelectorType>(yChannelSelector())); + if (attrName == SVGNames::scaleAttr) + return displacementMap->setScale(scale()); + + ASSERT_NOT_REACHED(); + return false; +} + void SVGFEDisplacementMapElement::svgAttributeChanged(const QualifiedName& attrName) { SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); if (attrName == SVGNames::xChannelSelectorAttr || attrName == SVGNames::yChannelSelectorAttr - || attrName == SVGNames::inAttr - || attrName == SVGNames::in2Attr || attrName == SVGNames::scaleAttr) + primitiveAttributeChanged(attrName); + + if (attrName == SVGNames::inAttr + || attrName == SVGNames::in2Attr) invalidate(); } |