Bug 1454233: Remove nsINode::eDOCUMENT. r=bz

MozReview-Commit-ID: ItjdI79zme7
This commit is contained in:
Emilio Cobos Álvarez
2018-04-15 11:43:15 +02:00
parent 72d7ca1d53
commit bf14ceaba3
19 changed files with 49 additions and 63 deletions

View File

@@ -993,13 +993,9 @@ nsContentList::AssertInSync()
// XXX This code will need to change if nsContentLists can ever match
// elements that are outside of the document element.
nsIContent *root;
if (mRootNode->IsNodeOfType(nsINode::eDOCUMENT)) {
root = static_cast<nsIDocument*>(mRootNode)->GetRootElement();
}
else {
root = static_cast<nsIContent*>(mRootNode);
}
nsIContent* root = mRootNode->IsDocument()
? mRootNode->AsDocument()->GetRootElement()
: mRootNode->AsContent();
nsCOMPtr<nsIContentIterator> iter;
if (mDeep) {