diff options
Diffstat (limited to 'Source/WebCore/svg/SVGFEDisplacementMapElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGFEDisplacementMapElement.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp index 873f85a..1429b34 100644 --- a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp +++ b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp @@ -97,13 +97,19 @@ void SVGFEDisplacementMapElement::svgAttributeChanged(const QualifiedName& attrN { SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); - if (attrName == SVGNames::xChannelSelectorAttr - || attrName == SVGNames::yChannelSelectorAttr - || attrName == SVGNames::scaleAttr) + if (attrName == SVGNames::xChannelSelectorAttr) { + ChannelSelectorType selector = static_cast<ChannelSelectorType>(xChannelSelector()); + if (CHANNEL_UNKNOWN > selector || selector > CHANNEL_A) + setXChannelSelectorBaseValue(CHANNEL_UNKNOWN); primitiveAttributeChanged(attrName); - - if (attrName == SVGNames::inAttr - || attrName == SVGNames::in2Attr) + } else if (attrName == SVGNames::yChannelSelectorAttr) { + ChannelSelectorType selector = static_cast<ChannelSelectorType>(yChannelSelector()); + if (CHANNEL_UNKNOWN > selector || selector > CHANNEL_A) + setYChannelSelectorBaseValue(CHANNEL_UNKNOWN); + primitiveAttributeChanged(attrName); + } else if (attrName == SVGNames::scaleAttr) + primitiveAttributeChanged(attrName); + else if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) invalidate(); } |