Bug 1454236: Remove nsINode::eDOCUMENT_FRAGMENT. r=bz

MozReview-Commit-ID: D2F3LbQ1pvw
This commit is contained in:
Emilio Cobos Álvarez
2018-04-15 12:14:22 +02:00
parent d9230e18f7
commit 2dbe99a0b4
12 changed files with 26 additions and 39 deletions

View File

@@ -215,11 +215,10 @@ IsElementOrTemplateContent(nsINode* aNode)
if (aNode) {
if (aNode->IsElement()) {
return true;
} else if (aNode->NodeType() == nsINode::DOCUMENT_FRAGMENT_NODE) {
}
if (aNode->IsDocumentFragment()) {
// Check if the node is a template content.
mozilla::dom::DocumentFragment* frag =
static_cast<mozilla::dom::DocumentFragment*>(aNode);
nsIContent* fragHost = frag->GetHost();
nsIContent* fragHost = aNode->AsDocumentFragment()->GetHost();
if (fragHost && nsNodeUtils::IsTemplateElement(fragHost)) {
return true;
}