зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450250: Preserve the behavior of GetOuterSVGElement so that it works for <animate>. r=heycam
It's used by SVGAnimationElement, and otherwise it can't find the root element if it's under a <use> element. It also feels like the right thing to do, and didn't break any XBL+svg tests (though we may as well get rid of those at this point). Differential Revision: https://phabricator.services.mozilla.com/D2195 MozReview-Commit-ID: Jx1JrTld8EL
This commit is contained in:
Родитель
8eaddfbb80
Коммит
a01c54ae7a
|
@ -41,13 +41,13 @@ using namespace mozilla::gfx;
|
|||
SVGSVGElement*
|
||||
SVGContentUtils::GetOuterSVGElement(nsSVGElement *aSVGElement)
|
||||
{
|
||||
nsIContent *element = nullptr;
|
||||
nsIContent *ancestor = aSVGElement->GetFlattenedTreeParent();
|
||||
Element* element = nullptr;
|
||||
Element* ancestor = aSVGElement->GetParentElementCrossingShadowRoot();
|
||||
|
||||
while (ancestor && ancestor->IsSVGElement() &&
|
||||
!ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
|
||||
element = ancestor;
|
||||
ancestor = element->GetFlattenedTreeParent();
|
||||
ancestor = element->GetParentElementCrossingShadowRoot();
|
||||
}
|
||||
|
||||
if (element && element->IsSVGElement(nsGkAtoms::svg)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче