| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| index 5ebdd6f1b632681a517a0e87bd03f273c6cb287b..e9776b30f7bb32fe77ffc64d37cd033d751e871b 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| @@ -918,9 +918,20 @@ void SVGElement::attributeChanged(const AttributeModificationParams& params) {
|
| AttributeModificationParams(params.name, params.oldValue, params.newValue,
|
| AttributeModificationReason::kDirectly));
|
|
|
| - if (params.name == HTMLNames::idAttr)
|
| + if (params.name == HTMLNames::idAttr) {
|
| rebuildAllIncomingReferences();
|
|
|
| + LayoutObject* object = layoutObject();
|
| + // Notify resources about id changes, this is important as we cache
|
| + // resources by id in SVGDocumentExtensions
|
| + if (object && object->isSVGResourceContainer())
|
| + toLayoutSVGResourceContainer(object)->idChanged();
|
| + if (isConnected())
|
| + buildPendingResourcesIfNeeded();
|
| + invalidateInstances();
|
| + return;
|
| + }
|
| +
|
| // Changes to the style attribute are processed lazily (see
|
| // Element::getAttribute() and related methods), so we don't want changes to
|
| // the style attribute to result in extra work here.
|
| @@ -942,18 +953,6 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName) {
|
| invalidateInstances();
|
| return;
|
| }
|
| -
|
| - if (attrName == HTMLNames::idAttr) {
|
| - LayoutObject* object = layoutObject();
|
| - // Notify resources about id changes, this is important as we cache
|
| - // resources by id in SVGDocumentExtensions
|
| - if (object && object->isSVGResourceContainer())
|
| - toLayoutSVGResourceContainer(object)->idChanged();
|
| - if (isConnected())
|
| - buildPendingResourcesIfNeeded();
|
| - invalidateInstances();
|
| - return;
|
| - }
|
| }
|
|
|
| void SVGElement::svgAttributeBaseValChanged(const QualifiedName& attribute) {
|
|
|