Bug 1565584: move nsIContentUtils::ContentIsDescendantOf to nsINode::IsInclusiveDescendantOf. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D37880
This commit is contained in:
Mirko Brodesser
2019-07-12 15:10:28 +02:00
parent 168131c86e
commit 090d7efc5e
34 changed files with 88 additions and 114 deletions

View File

@@ -533,7 +533,7 @@ void HTMLSelectElement::Add(nsGenericHTMLElement& aElement,
// Just in case we're not the parent, get the parent of the reference
// element
nsCOMPtr<nsINode> parent = aBefore->Element::GetParentNode();
if (!parent || !nsContentUtils::ContentIsDescendantOf(parent, this)) {
if (!parent || !parent->IsInclusiveDescendantOf(this)) {
// NOT_FOUND_ERR: Raised if before is not a descendant of the SELECT
// element.
aError.Throw(NS_ERROR_DOM_NOT_FOUND_ERR);