diff options
Diffstat (limited to 'dom/svg/SVGImageElement.cpp')
-rw-r--r-- | dom/svg/SVGImageElement.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dom/svg/SVGImageElement.cpp b/dom/svg/SVGImageElement.cpp index 264c03da09..4a1332fb00 100644 --- a/dom/svg/SVGImageElement.cpp +++ b/dom/svg/SVGImageElement.cpp @@ -310,4 +310,21 @@ SVGElement::StringAttributesInfo SVGImageElement::GetStringInfo() { ArrayLength(sStringInfo)); } +void SVGImageElement::DidAnimateAttribute(int32_t aNameSpaceID, + nsAtom* aAttribute) { + if ((aNameSpaceID == kNameSpaceID_None || + aNameSpaceID == kNameSpaceID_XLink) && + aAttribute == nsGkAtoms::href) { + bool hrefIsSet = + mStringAttributes[SVGImageElement::HREF].IsExplicitlySet() || + mStringAttributes[SVGImageElement::XLINK_HREF].IsExplicitlySet(); + if (hrefIsSet) { + LoadSVGImage(true, true); + } else { + CancelImageRequests(true); + } + } + SVGImageElementBase::DidAnimateAttribute(aNameSpaceID, aAttribute); +} + } // namespace mozilla::dom |