| Index: Source/core/svg/SVGMarkerElement.cpp
|
| diff --git a/Source/core/svg/SVGMarkerElement.cpp b/Source/core/svg/SVGMarkerElement.cpp
|
| index 053c315b5a47ac228868c9e071bcf436f0a90875..c2bae7ea1ee9996ec8c1f0ca1bb21315c8d6aaeb 100644
|
| --- a/Source/core/svg/SVGMarkerElement.cpp
|
| +++ b/Source/core/svg/SVGMarkerElement.cpp
|
| @@ -81,39 +81,28 @@ AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float
|
| return SVGFitToViewBox::viewBoxToViewTransform(viewBox()->currentValue()->value(), preserveAspectRatio()->currentValue(), viewWidth, viewHeight);
|
| }
|
|
|
| -bool SVGMarkerElement::isSupportedAttribute(const QualifiedName& attrName)
|
| -{
|
| - DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
|
| - if (supportedAttributes.isEmpty()) {
|
| - SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
|
| - supportedAttributes.add(SVGNames::markerUnitsAttr);
|
| - supportedAttributes.add(SVGNames::refXAttr);
|
| - supportedAttributes.add(SVGNames::refYAttr);
|
| - supportedAttributes.add(SVGNames::markerWidthAttr);
|
| - supportedAttributes.add(SVGNames::markerHeightAttr);
|
| - supportedAttributes.add(SVGNames::orientAttr);
|
| - }
|
| - return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
|
| -}
|
| -
|
| void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName)
|
| {
|
| - if (!isSupportedAttribute(attrName)) {
|
| - SVGElement::svgAttributeChanged(attrName);
|
| - return;
|
| - }
|
| -
|
| - SVGElement::InvalidationGuard invalidationGuard(this);
|
| -
|
| - if (attrName == SVGNames::refXAttr
|
| + bool isLengthAttr = attrName == SVGNames::refXAttr
|
| || attrName == SVGNames::refYAttr
|
| || attrName == SVGNames::markerWidthAttr
|
| - || attrName == SVGNames::markerHeightAttr)
|
| + || attrName == SVGNames::markerHeightAttr;
|
| +
|
| + if (isLengthAttr)
|
| updateRelativeLengthsInformation();
|
|
|
| - LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject());
|
| - if (renderer)
|
| - renderer->invalidateCacheAndMarkForLayout();
|
| + if (isLengthAttr || attrName == SVGNames::markerUnitsAttr
|
| + || attrName == SVGNames::orientAttr
|
| + || SVGFitToViewBox::isKnownAttribute(attrName)) {
|
| + SVGElement::InvalidationGuard invalidationGuard(this);
|
| + LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject());
|
| + if (renderer)
|
| + renderer->invalidateCacheAndMarkForLayout();
|
| +
|
| + return;
|
| + }
|
| +
|
| + SVGElement::svgAttributeChanged(attrName);
|
| }
|
|
|
| void SVGMarkerElement::childrenChanged(const ChildrenChange& change)
|
|
|