Bug 1276438 part 1. Move the implementation of the .body getter from nsHTMLDocument to nsIDocument. r=mystor
MozReview-Commit-ID: BhQuGS1NdmQ
This commit is contained in:
@@ -1076,26 +1076,6 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
||||
rv = NodePrincipal()->SetDomain(newURI);
|
||||
}
|
||||
|
||||
nsGenericHTMLElement*
|
||||
nsHTMLDocument::GetBody()
|
||||
{
|
||||
Element* html = GetHtmlElement();
|
||||
if (!html) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (nsIContent* child = html->GetFirstChild();
|
||||
child;
|
||||
child = child->GetNextSibling()) {
|
||||
if (child->IsHTMLElement(nsGkAtoms::body) ||
|
||||
child->IsHTMLElement(nsGkAtoms::frameset)) {
|
||||
return static_cast<nsGenericHTMLElement*>(child);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetBody(nsIDOMHTMLElement** aBody)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user