Chromium Code Reviews| Index: Source/core/svg/SVGLineElement.cpp |
| diff --git a/Source/core/svg/SVGLineElement.cpp b/Source/core/svg/SVGLineElement.cpp |
| index f774cd46c6f779ee9a71b10fbe89c1da3159f885..44a129c53a53d5d187e4d00164527c764430ccfb 100644 |
| --- a/Source/core/svg/SVGLineElement.cpp |
| +++ b/Source/core/svg/SVGLineElement.cpp |
| @@ -50,27 +50,8 @@ DEFINE_TRACE(SVGLineElement) |
| DEFINE_NODE_FACTORY(SVGLineElement) |
| -bool SVGLineElement::isSupportedAttribute(const QualifiedName& attrName) |
| -{ |
| - DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| - if (supportedAttributes.isEmpty()) { |
| - supportedAttributes.add(SVGNames::x1Attr); |
| - supportedAttributes.add(SVGNames::x2Attr); |
| - supportedAttributes.add(SVGNames::y1Attr); |
| - supportedAttributes.add(SVGNames::y2Attr); |
| - } |
| - return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| -} |
| - |
| void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName) |
| { |
| - if (!isSupportedAttribute(attrName)) { |
| - SVGGeometryElement::svgAttributeChanged(attrName); |
| - return; |
| - } |
| - |
| - SVGElement::InvalidationGuard invalidationGuard(this); |
| - |
| bool isLengthAttribute = attrName == SVGNames::x1Attr |
| || attrName == SVGNames::y1Attr |
| || attrName == SVGNames::x2Attr |
| @@ -79,17 +60,19 @@ void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName) |
| if (isLengthAttribute) |
| updateRelativeLengthsInformation(); |
| - LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
| - if (!renderer) |
| - return; |
| - |
| if (isLengthAttribute) { |
|
fs
2015/04/10 14:25:24
Merge blocks.
|
| - renderer->setNeedsShapeUpdate(); |
| - markForLayoutAndParentResourceInvalidation(renderer); |
| + SVGElement::InvalidationGuard invalidationGuard(this); |
| + |
| + LayoutSVGShape* object = toLayoutSVGShape(this->layoutObject()); |
| + if (!object) |
| + return; |
| + |
| + object->setNeedsShapeUpdate(); |
| + markForLayoutAndParentResourceInvalidation(object); |
| return; |
| } |
| - ASSERT_NOT_REACHED(); |
| + SVGGeometryElement::svgAttributeChanged(attrName); |
| } |
| bool SVGLineElement::selfHasRelativeLengths() const |