Index: Source/core/svg/SVGEllipseElement.cpp |
diff --git a/Source/core/svg/SVGEllipseElement.cpp b/Source/core/svg/SVGEllipseElement.cpp |
index 0c428a643b00bac9ecabcac5a9bf4d53bbc3cfb3..ca8f1a605af6848d0b7328e46c05064c425e7bf0 100644 |
--- a/Source/core/svg/SVGEllipseElement.cpp |
+++ b/Source/core/svg/SVGEllipseElement.cpp |
@@ -67,6 +67,32 @@ void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt |
parseAttributeNew(name, value); |
} |
+bool SVGEllipseElement::isPresentationAttribute(const QualifiedName& attrName) const |
+{ |
+ if (attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) |
+ return true; |
+ return SVGGeometryElement::isPresentationAttribute(attrName); |
+} |
+ |
+bool SVGEllipseElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrName) const |
+{ |
+ if (attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) |
+ return true; |
+ return SVGGeometryElement::isPresentationAttributeWithSVGDOM(attrName); |
+} |
+ |
+void SVGEllipseElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) |
+{ |
+ RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute(name); |
+ if (property == m_rx) |
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyRx, *m_rx->currentValue()); |
+ else if (property == m_ry) |
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyRy, *m_ry->currentValue()); |
+ else |
+ SVGGeometryElement::collectStyleForPresentationAttribute(name, value, style); |
+} |
+ |
+ |
void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
if (!isSupportedAttribute(attrName)) { |
@@ -76,10 +102,18 @@ void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) |
SVGElement::InvalidationGuard invalidationGuard(this); |
+ bool isPresentationLengthAttribute = |
+ attrName == SVGNames::rxAttr |
+ || attrName == SVGNames::ryAttr; |
+ if (isPresentationLengthAttribute) { |
+ invalidateSVGPresentationAttributeStyle(); |
+ setNeedsStyleRecalc(LocalStyleChange, |
+ StyleChangeReasonForTracing::fromAttribute(attrName)); |
+ } |
+ |
bool isLengthAttribute = attrName == SVGNames::cxAttr |
- || attrName == SVGNames::cyAttr |
- || attrName == SVGNames::rxAttr |
- || attrName == SVGNames::ryAttr; |
+ || attrName == SVGNames::cyAttr |
+ || isPresentationLengthAttribute; |
if (isLengthAttribute) |
updateRelativeLengthsInformation(); |