зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1477965: Fix SVGAnimationElement::AfterSetAttr. r=heycam
It's not fine to only check if we're in a document in one of the code paths. Differential Revision: https://phabricator.services.mozilla.com/D2321 MozReview-Commit-ID: JXLexono4kv
This commit is contained in:
Родитель
ea14bba80a
Коммит
47b44daec3
|
@ -282,6 +282,10 @@ SVGAnimationElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
|||
}
|
||||
}
|
||||
|
||||
if (!IsInComposedDoc()) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!((aNamespaceID == kNameSpaceID_None ||
|
||||
aNamespaceID == kNameSpaceID_XLink) &&
|
||||
aName == nsGkAtoms::href)) {
|
||||
|
@ -305,8 +309,7 @@ SVGAnimationElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
|||
AnimationTargetChanged();
|
||||
} // else: we unset xlink:href, but we still have href attribute, so keep
|
||||
// mHrefTarget linking to href.
|
||||
} else if (IsInComposedDoc() &&
|
||||
!(aNamespaceID == kNameSpaceID_XLink &&
|
||||
} else if (!(aNamespaceID == kNameSpaceID_XLink &&
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::href))) {
|
||||
// Note: "href" takes priority over xlink:href. So if "xlink:href" is being
|
||||
// set here, we only let that update our target if "href" is *unset*.
|
||||
|
|
Загрузка…
Ссылка в новой задаче