Bug 1565584: move nsIContentUtils::ContentIsDescendantOf to nsINode::IsInclusiveDescendantOf. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37880
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user