| Index: Source/core/svg/SVGMaskElement.cpp
|
| diff --git a/Source/core/svg/SVGMaskElement.cpp b/Source/core/svg/SVGMaskElement.cpp
|
| index c26ebfe9c5dcf9a057437a9c935996352eaec80a..a1b8507bc6470fbfff9dcbaac27c773d877fad36 100644
|
| --- a/Source/core/svg/SVGMaskElement.cpp
|
| +++ b/Source/core/svg/SVGMaskElement.cpp
|
| @@ -85,6 +85,31 @@ bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)
|
| return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
|
| }
|
|
|
| +bool SVGMaskElement::isPresentationAttribute(const QualifiedName& attrName) const
|
| +{
|
| + if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
|
| + return true;
|
| + return SVGElement::isPresentationAttribute(attrName);
|
| +}
|
| +
|
| +bool SVGMaskElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrName) const
|
| +{
|
| + if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
|
| + return true;
|
| + return SVGElement::isPresentationAttributeWithSVGDOM(attrName);
|
| +}
|
| +
|
| +void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
|
| +{
|
| + RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute(name);
|
| + if (property == m_x)
|
| + addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m_x->currentValue());
|
| + else if (property == m_y)
|
| + addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m_y->currentValue());
|
| + else
|
| + SVGElement::collectStyleForPresentationAttribute(name, value, style);
|
| +}
|
| +
|
| void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
|
| {
|
| parseAttributeNew(name, value);
|
| @@ -100,6 +125,13 @@ void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
|
| SVGElement::InvalidationGuard invalidationGuard(this);
|
|
|
| if (attrName == SVGNames::xAttr
|
| + || attrName == SVGNames::yAttr) {
|
| + invalidateSVGPresentationAttributeStyle();
|
| + setNeedsStyleRecalc(LocalStyleChange,
|
| + StyleChangeReasonForTracing::fromAttribute(attrName));
|
| + }
|
| +
|
| + if (attrName == SVGNames::xAttr
|
| || attrName == SVGNames::yAttr
|
| || attrName == SVGNames::widthAttr
|
| || attrName == SVGNames::heightAttr)
|
|
|