Chromium Code Reviews| Index: Source/core/svg/SVGCircleElement.cpp |
| diff --git a/Source/core/svg/SVGCircleElement.cpp b/Source/core/svg/SVGCircleElement.cpp |
| index 10402a942a35776af0cc69c312703a77405f0999..00a5e6fc1cc219ad025b59158bf7bd06a17e2851 100644 |
| --- a/Source/core/svg/SVGCircleElement.cpp |
| +++ b/Source/core/svg/SVGCircleElement.cpp |
| @@ -47,17 +47,6 @@ DEFINE_TRACE(SVGCircleElement) |
| DEFINE_NODE_FACTORY(SVGCircleElement) |
| -bool SVGCircleElement::isSupportedAttribute(const QualifiedName& attrName) |
| -{ |
| - DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| - if (supportedAttributes.isEmpty()) { |
| - supportedAttributes.add(SVGNames::cxAttr); |
| - supportedAttributes.add(SVGNames::cyAttr); |
| - supportedAttributes.add(SVGNames::rAttr); |
| - } |
| - return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| -} |
| - |
| bool SVGCircleElement::isPresentationAttribute(const QualifiedName& attrName) const |
| { |
| if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr |
| @@ -89,24 +78,27 @@ void SVGCircleElement::collectStyleForPresentationAttribute(const QualifiedName& |
| void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) |
| { |
| - if (!isSupportedAttribute(attrName)) { |
| - SVGGeometryElement::svgAttributeChanged(attrName); |
| - return; |
| - } |
| + if (attrName == SVGNames::rAttr |
| + || attrName == SVGNames::cxAttr |
| + || attrName == SVGNames::cyAttr) { |
| + SVGElement::InvalidationGuard invalidationGuard(this); |
| - SVGElement::InvalidationGuard invalidationGuard(this); |
| + invalidateSVGPresentationAttributeStyle(); |
| + setNeedsStyleRecalc(LocalStyleChange, |
| + StyleChangeReasonForTracing::fromAttribute(attrName)); |
| + updateRelativeLengthsInformation(); |
| - invalidateSVGPresentationAttributeStyle(); |
| - setNeedsStyleRecalc(LocalStyleChange, |
| - StyleChangeReasonForTracing::fromAttribute(attrName)); |
| - updateRelativeLengthsInformation(); |
| + LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
| + if (!renderer) |
| + return; |
| + |
| + renderer->setNeedsShapeUpdate(); |
| + markForLayoutAndParentResourceInvalidation(renderer); |
|
fs
2015/04/10 14:25:23
Drop this blank line.
Erik Dahlström (inactive)
2015/04/10 15:33:43
Done.
|
| - LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
| - if (!renderer) |
| return; |
| + } |
| - renderer->setNeedsShapeUpdate(); |
| - markForLayoutAndParentResourceInvalidation(renderer); |
| + SVGGraphicsElement::svgAttributeChanged(attrName); |
| } |
| bool SVGCircleElement::selfHasRelativeLengths() const |